1.

The automatic variables _________________________(a) Must be declared after its use(b) Must be declared before using(c) Must be declared, can be anytime(d) Must not be initializedI have been asked this question at a job interview.This key question is from Automatic Variable topic in chapter Memory Allocation & Scope of Variable of Object Oriented Programming

Answer» RIGHT OPTION is (b) Must be declared before using

For explanation: All the automatic VARIABLES in a program must be declared before their use. The COMPILER won’t allow any use of variable if those are not declared before their use.


Discussion

No Comment Found

Related InterviewSolutions