Learn C: A variation of the first program

This entry is part 4 of 7 in the series Learn C

#include <stdio.h>

void main()
{
    printf("\n");
    printf("Hello World");
    printf("\n");
    printf("This is my first program.\n");
}

hello1

The “\n” is a special character.  It means new line here.  Notice the 2 new lines in the hello program.

printf is a print function defined in stdio.h, that is also why there is an include statement in the beginning.

The “;” denotes the end of a statement.

Series Navigation<< Learn C: What are the resources available on the web to learn C?
Learn C: Special Characters >>