Symbolic Constant
Symbolic constant are the name given to constant values that can not be changed during the executions of the program like. Generally these are defined with the help of # defined statements in the definition section of the program.
e.g #include<stdio.h>
#include<conio.h>
#define PI 4.15
main()
{
___________
___________
}
Now in the execution wherever compiler will find the symbolic constant PI in the statements it will replace PI with 4.15 automatically.
Declaration of variables :-
A variables is used to hold data within your program. A variables represents a location in your computer's memory. You can put data into this location and retrieve data out of it. Every variables has two parts, a name and a data type.
- It defines the name of the variables.
- It defines the type of the variables (integer, real, character, etc).
- It gives the programmer a description of the variable
int answer; /* the result of our expression*/
The keyword int tells C that this variables contains an integer value.
The variables name is answer.
The semicolon (;) marks the end of the statement.
The comment is used to define this variables for the program.
Comments
Post a Comment