OOPS
August 29, 2024OOPS
August 29, 2024OOPS
Question 45
|
Which of the following storage classes have global visibility in C/C++ ?
Auto
|
|
Extern
|
|
Static
|
|
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.
Subscribe
Login
0 Comments