fig:- variable and constant
If a variable doesn’t change the value during the execution is called a constant variable, whereas the variable that changes the value during the execution of the program is called a variable. constant can be divided into 2 parts they are:-
fig: - Types of variable |
Assigning value of a variable on c
Assignment operators are used to assigning the value in the operator.
Syntax
Int variable = 10; // here the value of 10 is assign in variable
Similarly, we can read the data from keyboard. For that we will use scanf function
Syntax
scanf ("control string", &variable1, &variable2);
%d = for int
%c = for char
%f = for float
%s = for string
code
0 Comments