capypad
0 day streak
c / beginner
Snippet

Hello World Basics

This is the simplest C program. It includes the standard input-output library and defines the main entry point where execution begins.

snippet.c
c
1
2
3
4
5
6
#include <stdio.h>
 
int main() {
printf("Hello, World!\n");
return 0;
}
Breakdown
1
#include <stdio.h>
Includes the standard library for input and output functions.
2
int main()
The starting point of every C program.
3
printf(...);
A function used to print text to the console.