C - Data Types - Discussion

You Are Here :: Home > C > Data Types - Discussion

 



Q.

#include

int main(){
{
static int a=5;
printf("%d",a);
}
//printf("%d",a); variable a is not visible here.
return 0;
}

A. 0 B. 2
C. 5 D. error

Answer: Option C
Explaination:

If we declared static variable locally then its visibility will within a block where it has declared.



Discussion

Your Comments Goes here...
NameDiscussion