Skip to main content

Posts

Showing posts with the label local variable

Variables in C language

  Variables in C A  variable  is a name of the memory location. It is used to store data. Its value can be changed, and it can be reused many times. It is a way to represent memory location through symbol so that it can be easily identified. Let's see the syntax to declare a variable:   1.       type variable_list;   The example of declaring the variable is given below: 1        int  a;   2.       float  b;   3.       char  c;   Here, a, b, c are variables. The int, float, char are the data types. We can also provide values while declaring the variables as given below:   1.       int  a=10,b=20; //declaring 2 variable of integer type    2.       float  f=20.8;   3.   ...