Before we study basic building blocks of the C programming language, let us look a bare minimum C program structure so that we can take it as a reference in upcoming chapters.
C Hello World Example
A C program basically consists of the following parts:
Preprocessor Commands
Functions
Variables
Statements & Expressions
Comments
Let us look at a simple code that would print the words "Hello World":
#include <stdio.h>
int main() { /* my first program in C */
printf("Hello, World! \n");
return 0;
}
C Hello World Example
A C program basically consists of the following parts:
Preprocessor Commands
Functions
Variables
Statements & Expressions
Comments
Let us look at a simple code that would print the words "Hello World":
#include <stdio.h>
int main() { /* my first program in C */
printf("Hello, World! \n");
return 0;
}
No comments:
Post a Comment