The main() Function of C

C programs are composed of functions which are vaguely analogous to recipes. A function can take inputs (like ingredients) and it can produce outputs (like a cake). (Don't worry, we won't keep up this analogy for long.)
Now let's return to our "Hello World" program. It's only function was:
main()
{
   printf("Hello World\n");
}

For now, it will suffice to notice only a few things about function definitions:
  1. Every C program must have a function called main() .
  2. Even though there are more precise ways of defining main() , it is enough in simple examples to just follow the name of the function ( main ) with an empty set of parentheses.
  3. The actions that are to make up the program are listed within a balanced set of braces that follow the line declaring main.
  4. While the placement of the braces is not defined by the C language, we will consistently follow this style and you are encouraged to do the same.

Joe Inexperienced Hacker tried to write "Hello World" this way:
#include <stdio.h>
Main
{
   printf("hello world\n");
{
In what ways did he fail to produce a valid C program? (Check all the applicable options.)

He capitalized main.

He failed to capitalize hello world.

He forgot the parentheses.

He didn't balance opening braces with closing ones.

He misspelled print.