adsense


Friday, 20 November 2015

C++ LANGUAGE INITIALIZING LOCAL AND GLOBAL VARIABLES PAGE 22

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button



C++ LANGUAGE INITIALIZING LOCAL AND GLOBAL VARIABLES








Initializing Local and Global Variables 


When a local variable is defined, it is not initialized by the system, 
you must initialize it yourself. Global variables are initialized 
automatically by the system when you define them as follows: 

Initializer 

int             0 
char          '\0' 
float           0 
double          0 
pointer         NULL 


It is a good programming practice to initialize variables properly, 
otherwise sometimes program would produce unexpected result. 



No comments: