adsense


Friday, 20 November 2015

C++ LANGUAGE TYPE QUALIFIERS PAGE 27

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



C++ LANGUAGE TYPE QUALIFIERS






Type Qualifiers in C++ 


The type qualifiers provide additional information about the variables they precede. 



Qualifier  Meaning 

const          Objects of type const cannot be changed by 
                your program during execution 
volatile  The modifier volatile tells the compiler that 
                a variable's value may be changed in ways not 
                explicitly specified by the program. 
restrict  A pointer qualified by restrict is initially 
                the only means by which the object it points to can be accessed. 
                Only C99 adds a new type qualifier called restrict. 

The register should only be used for variables that require quick 
access such as counters. It should also be noted that defining 
'register' does not mean that the variable will be stored in a register. 
It means that it MIGHT be stored in a register depending on hardware and 
implementation restrictions. 



No comments: