This page provides examples and documentation for the C programming language on our website.
Common C Examples
Hello World!
- This is a simple example of a C program that prints "Hello, World!" to the console.
#include <stdio.h> int main() { printf("Hello, World!\n"); return 0; }
- [More on C Hello World](/Documentation/en/Examples/C/HelloWorld)
Variable Initialization
- C allows you to initialize variables at the time of declaration.
int a = 10; // Initialize integer a with the value 10 float b = 3.14f; // Initialize float b with the value 3.14 char c = 'A'; // Initialize character c with the value 'A'
- [Learn more about variable initialization](/Documentation/en/Examples/C/VariableInitialization)
Resources
C Programming