Hello World Program in C | Basic C Language Example


Our Blogs

Hello-World.webp

Hello World program in C language

C Language

Publish Date: April, 25-2019

The "Hello World" Program in C

The intent of your code snippet:

C

#include #include void main() { printf("Hello World !"); }

Standard C Code

For a modern C compiler, the most accurate and standardized way to write this program is:

C

#include <stdio.h>

int main() {
    printf("Hello World !");
    return 0; // Indicates successful execution
}

Code Explanation

  1. #include <stdio.h>

    • This line is a preprocessor directive. It tells the compiler to include the contents of the standard input/output library (stdio.h).

    • This library contains the definition for the printf() function, which is necessary to display output on the console.

  2. int main() { ... }

    • This is the main function where the program execution begins.

    • int indicates that the function will return an integer value.

    • The use of void main() is often accepted by older compilers but is non-standard in modern C.

  3. printf("Hello World !");

    • This is the core command. The printf function prints the text string enclosed in the double quotes (" ") to the console (or standard output).

    • The semicolon (;) marks the end of the statement.

  4. return 0;

    • This is a standard practice within the int main() function.

    • It tells the operating system that the program has executed successfully.

Output:

Hello World !

Recent Post :-

8th-Foundation-Day.webp

Paramwebinfo Celebrates 8th Foundation Day

Events

Publish Date: August, 03-2026

8th-Foundation_1.webp

Paramwebinfo Celebrates 8th Foundation Day 2026

Events

Publish Date: July, 31-2026

YouTube-marketing-poster_11zon.webp

Grow your business with YouTube Promotion Services in Raipur by Paramwebinfo

YouTube Marketing Services

Publish Date: July, 28-2026

Digital-Pehchan_11zon.webp

Help Customers Find Your Business Online with Paramwebinfo Raipur

Digital Marketing

Publish Date: July, 06-2026

YouTube-vs-Facebook-marketing_11zon.webp

YouTube Marketing vs Facebook Marketing Which is Better

Social Media Marketing Services

Publish Date: July, 03-2026

ECommerceWebsite.webp

E-Commerce Website Development Trends You Should Know in 2026

E-Commerce Websites

Publish Date: July, 01-2026