There is only one very simple C program, and it says “Hello, World!” The first thing it does is include the stdio.h library, which has methods like printf() for input and output. The printf() function is used in the main() code to show the message “Hello, World!” on the screen. The last part of the program is return 0, which tells the system that the program ran properly.

#include <stdio.h>

int main() {
    printf("Hello, World!\n");  // This prints Hello, World! to the screen
    return 0;  // Ends the program
}

Leave a Reply

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

Verified by MonsterInsights