Due Thursday July 13. We will do this lab together in the lab during class.
create a directory named lab0
under your home directory
create a file named hello.c
in that directory, with the following contents:
/* This program was entered by _your name here_ */
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
}
compile hello.c
by typing gcc -o hello hello.c
run the resulting binary (./hello
) and verify that it prints hello, world
modify the program to print something else of your choosing
create the Makefile
to compile your program:
hello: hello.c
gcc -Wall -ansi -o hello hello.c
run make
and then run ./hello
again to verify that it prints your message.
submit according to the submission instructions