General form for defining a variable in a C program

In a C program variables are the entities whose values can be changed throughout the program. A variable has to be defined before its usage in the program. A variable can be declared inside functions, outside functions and in the definition of function parameters. Here’ the general form for defining a variable:

variable_type variable_list;

For example: int i;

Here int is the type of the variable and i is the variable list.

Leave a Reply