MCQOPTIONS
Bookmark
Saved Bookmarks
→
Functions
→
General
→
Which variable has the longest scope? int b; int...
1.
Which variable has the longest scope? int b; int main() { int c; return 0; } int a;
A.
a
B.
b
C.
c
D.
Both (a) and (b)
Answer» C. c
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
Is initialization mandatory for local static variables?
What is the format identifier for static a = 20.5; ?
Functions have static qualifier for its declaration by default.
What is the scope of a function?
What is the scope of an external variable?
The variable declaration with no storage class specified is by default:
Automatic variables are variables that are?
What linkage does automatic variables have?
What is the output of this C code? int main() { auto i = 10; const auto int *p = &i; printf("%d n", i); }
Automatic variables are stored in:
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies