Hello, World!

Lab C Beginner 10 points

Write a C program that prints exactly Hello, World! followed by a new line.

Input

None.

Output

Hello, World!

Example

Output

Hello, World!
Sample output available
Editor
C

Hints

printf does not add a new line by itself - end the text with \n.

main returns 0 to say the program finished successfully.

Solution explanation

Every C program starts in main. #include <stdio.h> brings in printf, and \n ends the line.

Show solution
#include <stdio.h>

int main() {
    printf("Hello, World!\n");
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD