...
NTA UGC NET JUNE-2023 Paper-2
August 29, 2024
OOPS
August 29, 2024
NTA UGC NET JUNE-2023 Paper-2
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 45
Which of the following storage classes have global visibility in C/C++ ?
A
Auto
B
Extern
C
Static
D
Register
Question 45 Explanation: 
→ Register and auto variables have limited scope (the block in which they are declared) and limited lifetimes (as for automatic variables). However, in some applications it may be useful to have data which is accessible from within any block and/or which remains in existence for the entire execution of the program. Such variables are called global variables. The scope of external variables is global.
Correct Answer: B
Question 45 Explanation: 
→ Register and auto variables have limited scope (the block in which they are declared) and limited lifetimes (as for automatic variables). However, in some applications it may be useful to have data which is accessible from within any block and/or which remains in existence for the entire execution of the program. Such variables are called global variables. The scope of external variables is global.

Leave a Reply

Your email address will not be published. Required fields are marked *