C Program Structure


#include <stdio.h>
     /* My first program */
     printf("Hello World! \n");


C Language is case sensitive. All commands should be in lowercase. End of each statement must be marked with a semicolon.

Starting point of any program is identified by word main(). This means where the program actually starts.

Two braces { and } means the begin and end of the segment. (blocks of statements) (1)

#include<stdio.h> is to allow the use of printf statement in program. Stdio.h is header file –  header file contains definitions of functions and variables. #include is a preprocess command that includes header files before compiling a C program.

printf() is a function / procedure in C Language used to print variable or text.

Comments can be inserted into C programs by bracketing text with the /* and */ delimiters. Whatever comes inside the command won’t be considered for compilation and execution. Used for internal documentation.

C Compilation Code






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s