C-Programming-data-structure || 2012 MCQ || 2-mark || Module 1: C Programming

Last Updated :
Discuss
Comments

Consider the following C code segment.

C
int a, b, c = 0;
void prtFun (void);
main ()
{ 
static int a = 1;   /* Line 1*
prtFun ();
a + = 1;
prtFun ();
pringf(“\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);
}

What output will be generated by the given code segment? 2012 MCQ || 2-mark

3 1

4 1

4 2

4 2

6 1

6 1

4 2

6 2

2 0

3 1

5 2

5 2

Share your thoughts in the comments
Article Tags :