MCQs
The statement makes CHAR a synonym for char*.
In statement 1 lvalue is required as unary ‘&’ operand and in statement 3 lvalue is required as
left operand.
We will get compilation error because ‘i’ is an undeclared identifier.
The variable that is declared as static has a file scope.
Output:
$ g++ dec2.cpp
$ a.out
234
We can declare variables with the same name in two functions because their scope lies within the
function.
The local values of a and g within the block are more dominant than the global values.
Output:
$ g++ dec1.cpp
$ a.out
2035655065
The keyword extern is not a definition and is not allocated storage until it is initialized.
No extern are allowed for class declarations.
Global values are implicitly initialised to 0, but local values have to be initialised by the system.
An identifier can be declared many times must be defined just once.