COS 126

Hello, World
Programming Assignment 0

Due: Thursday, 11:59pm

The purpose of this assignment is to familiarize you with using the computer and with the mechanics of preparing and submitting assignment solutions. This assignment carries no grade, but you must do the electronic submission. Your goal this week is to learn to use emacs for editing files, gcc for compiling programs, and submit for submitting assignments.

If you have programmed before, you may be able to finish this assignment quickly. If you have not programmed before, or if you are not familiar with the systems that we use, plan to learn the basics in the computer lab in room 101 in the CS building. Don't be afraid to ask for help.

Your assignment is to create, compile, and run the following extension of everybody's first C program.

#include <stdio.h>

int main(void) {
    int n;
    printf("Hello world! Give me an integer:\n");
    scanf("%d", &num);
    printf("Thanks! I've always been fond of %d.\n", num);
    return 0;
}

Completing this assignment involves the following steps.

To log out, position the mouse over the background, i.e., not over any windows, click the right mouse button, and select "Logout". Alternatively, you can just click the "EXIT" button in the Control Panel. Don't forget to log out!


Copyright © 2000 Robert Sedgewick