we can declare a variable using the following syntax
datatype variablename;
actually variable is the name given to the memory location which store values.
you have to give a statement in the following syntax datatype variable;
Declare the type (int, char, double, etc) followed by the name of the variable. The variable name is a reference to the memory allocated to the type being declared. If the variable is a pointer to the type, precede the name with *. In C++, you may also initialise variables in the declaration.
Simplest case: the;A more difficult case: the [];
Use the pointer operator (*) immediately after the type.
void, in C, is a type that has no size. Thus, if you were to declare a variable of type "void", the compiler would not know how much memory to allocate for it.
you have to give a statement in the following syntax datatype variable;
you have to give a statement in the following syntax datatype variable;
Declare the type (int, char, double, etc) followed by the name of the variable. The variable name is a reference to the memory allocated to the type being declared. If the variable is a pointer to the type, precede the name with *. In C++, you may also initialise variables in the declaration.
Simplest case: the;A more difficult case: the [];
Use the pointer operator (*) immediately after the type.
Just type declare then the variable that you desire to assigned a certain constant value on it. Just type declare then the variable that you desire to assigned a certain constant value on it.
void, in C, is a type that has no size. Thus, if you were to declare a variable of type "void", the compiler would not know how much memory to allocate for it.
A constant is a variable that does not change. The correct term is constant variable.
datatype variable name;
No., If you want to declare you jus use _ in between so the declaration will be like int seg_no;
It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.
static is not a class it is a storage class which is used to declare a local-scope variable.