Categories
b. Structure of C programming

Example of C Program Structure

The “Hello World!” example is the most popular and basic program that will help you get started with programming. This program helps you display the output “Hello World” on the output screen.

With the help of this example, we can easily understand the basic structure of a C program.

#include <stdio.h>
int main()

{
// Our first basic program in C printf
("Hello World!\n\n");
{
return 0;
}

Code on Screen-

Output- 

You can practice the code explained above and compile it on your machine to get an essence of C programming.

Key takeaway: \n is used to move the cursor to the new line.

Leave a Reply

Your email address will not be published. Required fields are marked *