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 :-

DigitalIndia_11zon.webp

Top Digital Growth Trends in Raipur for 2026 by Paramwebinfo

Digital Marketing

Publish Date: April, 20-2026

InternshipVsTraining_11zon.webp

Internship vs Training What is Better for Students

Internship

Publish Date: April, 18-2026

Branding vs marketing_11zon.webp

Branding vs Marketing What Works Best in Raipur

Branding Tips

Publish Date: April, 14-2026

Web-hosting-offer_11zon.webp

Best Web Hosting Offer in Raipur at Rs 3200 Year

Offers

Publish Date: April, 12-2026

DMS-for-business growth_11zon.webp

Grow Your Business with Digital Marketing Services in Raipur

Digital Marketing Services

Publish Date: April, 09-2026

domain-name-matters_11zon.webp

Why Domain Name Is Important for Your Business

Domain

Publish Date: April, 07-2026

website-design-offer-banner_11zon.webp

Business Website Design Offer in Raipur Rs 7999 Only

Offers

Publish Date: April, 05-2026