Object declared in main() function _____________

Object declared in main() function _____________
A. Can be used by any other function
B. Can be used by main() function of any other program
C. Can’t be used by any other function
D. Can be accessed using scope resolution operator
 
Answer: c
Explanation: The object declared in main() have local scope inside main() function only. It can’t be used outside main() function. Scope resolution operator is used to access globally declared variables/objects.
 

Tìm kiếm

Back
Top