C "Hello, World!" Program - Write Your First C Program

Hello World Program

The simplest C program prints a message to the screen. This example shows how to write "Hello, World!" using the standard library.

#include <stdio.h>
int main() {
    printf("Hello, World!\n");
    return 0;
}
Hello, World!
        

This program demonstrates how every C program starts execution from the main() function. The printf() call sends a string to the standard output, and returning 0 tells the operating system that the program completed successfully.


Comments

💬 Please keep your comment relevant and respectful. Avoid spamming, offensive language, or posting promotional/backlink content.
All comments are subject to moderation before being published.


Loading comments...