CS157: Intro to C, Part II                

Spring 2018                

Homework #0: Say Hello                

Homework #0: Say Hello                

The purpose of this assignment is to make sure that you can login to a Linux system and use the checkin program. This way, you’re sure that your login and password work before you need them for homework #1. This assignment is not optional.                 

1) Log on to a CS Department Linux system. Use an editor to create a file called hi.c that contains exactly this (upper/lower case matters):                 

    #include <stdio.h>

    int main() {
        printf("Hello, CS157 Spring 2018!\n");
        return 0;

2) Compile & execute your program. My prompt is “%”; yours will be different. Note the capital W in “-Wall”.                 

    % c11 -Wall hi.c
    % ./a.out
    Hello, CS157 Spring 2018!

3) Use                 

    ~cs157/bin/checkin HW0 hi.c

or web checkin.                 

Modified: 2017-04-03T08:41                 

User: Guest                 

Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building