GATE Computer Science (CS) 2012 Solved Paper

Show Para  Hide Para 
Question Numbers: 58-59
Consider the following C code segment.
int a, b, c = 0;
void prtFun(void);
main( )
{ static int a = 1; /* Line 1 */
prtFun( );
a += 1;
prtFun( );
printf(“ \n %d %d ”, a, b);
}
void prtFun(void)
{ static int a = 2; /* Line 2 */
int b = 1;
a += ++b;
printf(“ \n %d %d ”, a, b);
}
© examsnet.com
Question : 58
Total: 65
Go to Question: