CS156: Intro to C, Part I

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, CS156 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, CS156 Spring 2018!

3) Use web checkin, or turn it in like this:                 

    ~cs156/bin/checkin HW0 hi.c

User: Guest                 

Edit History Source

Modified: 2016-09-26T13:14                 

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