Declaration (computer Science) Article Index for
Declaration
Shopping
Declaration
Website Links For
Declaration
 

Information About

Declaration (computer Science)




Initialization allows a program to assign an initial value to a variable. Below is an example of a function in C and C++ (the syntax is the same in this case) which declares an Integer variable, x; this is followed by an example where the variable has been initialized to seven, x = 7:

void example1Girish()
{
int x;
}



void example2()
{
int x = 7;
}



SEE ALSO