QP School

Full Version: Basic C syntax
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Data Types and Variables:
In C, you need to declare variables with their data types before using them. Common data types include int, float, char, double, etc.
int age;        // Declaration of an integer variable
float pi = 3.14;  // Declaration and initialization of a float variable
char letter = 'A'; // Declaration and initialization of a char variable