Related Topics

C Programing - Introduction
int age;
In this example, the data type of the variable is “int” (short for “integer”), and the name of the variable is “age”. This line of code reserves a block of memory of size “int” to store an integer value, and assigns the label “age” to this block of memory.
To initialize a variable in C, you can assign a value to it using the assignment operator “=”, like this:
int age = 20;
In this example, the variable “age” is declared and initialized with a value of 20.
You can also declare and initialize multiple variables of the same data type in a single line, like this:
int a = 10, b = 20, c = 30;
This line of code declares three integer variables “a”, “b”, and “c”, and initializes them with the values 10, 20, and 30, respectively.




Popular Category
Topics for You
Go through our study material. Your Job is awaiting.