logoISU  

CS256 - Principles of Structured Design

Fall 2021

Displaying ./code/cs256su21code/jun23/hello.c

/*

midterm review: making a complete program

revisiting making "Hello World!" to show the parts of making
a complete program



*/

#include <stdio.h> //include statements go at the top
				   // including stdio.h is what allows us to use printf

int main(){ //every C program has a main function

	printf("Hello, world!\n"); //this prints "hello world" and a newline to the screen


	return 0; //this is what ends the main function
			  // by convention, we usually return 0 at the end of main to indicate
			  // that everything went okay. 
	
	//it will compile if you don't include a return statement here, but it is bad practice not to.
}