Home Modern › Forums › ISRO ›
What is the output of the following program?
#includeint tmp=20;main( ){printf("%d ",tmp);func( );printf("%d ",tmp);}func( ){static int tmp=10;printf("%d ",tmp);}
(A) 20 10 10
(B) 20 10 20
(C) 20 20 20
(D) 10 10 10
› Reply To:
What is the output of the following program?
#includeint tmp=20;main( ){printf("%d ",tmp);func( );printf("%d ",tmp);}func( ){static int tmp=10;printf("%d ",tmp);}
(A) 20 10 10
(B) 20 10 20
(C) 20 20 20
(D) 10 10 10
nan