Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Write a program that prints the message “Hello, World!”

C
#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}

Explanation:

  • In C, the printf() function is used to print output to the console.
  • The \n at the end of the string is the newline character, which adds a line break after the message.
  • The main() function is the entry point of the program, and return 0 indicates a successful execution of the program.

Output:

Output
Hello, World!