1.

Whenever a function is declared in a program _____________________(a) extern can be used only in some special cases(b) extern can’t be used(c) function is extern by default(d) it can’t be made externI got this question in examination.This intriguing question comes from Extern Variable in chapter Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

Right answer is (C) function is extern by DEFAULT

Best explanation: Even if we don’t specify a function to be extern, by default all the functions are exter. The COMPILER adds the keyword at the beginning of the function declaration. If there is an extern function to be USED then it will be used otherwise the new function only will be used.



Discussion

No Comment Found

Related InterviewSolutions