A. Constant variables need not be defined as they are declared and can be defined later
B. Global constant variables are initialized to zero
C. const keyword is used to define constant values
D. You cannot reassign a value to a constant variable
Explanation : Since the constant variable has to be declared and defined at the same time, not doing it results in an error.
4 The default storage class of a ‘C’ variable is
A. auto auto
B. static static
C. extern extern
D. register register
Explanation : The auto storage class is the default storage class for all local variables. The example above defines two variables with in the same storage class. 'auto' can only be used within functions, i.e., local variables.
5 Which of the following is not a proper storage class in C?
7 Which of the following is not a proper storage class in ‘C’?
11 Register variable are active
A. outside the function
B. throughout the program
C. only in the function where it is defined
D. surrounding of that function
12 Identify the storage class with which & operator cannot be used.
Explanation : The register storage class is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).
O level Exam is an online learning platform that helps O level Students to achieve their personal and professional goals.