-
What will be the output of the following C program ?
void count (int n){
static int d=1;
print f (“%d”, n);
print f (“%d”, d);
d++;
if (n>1) count (n – 1);
print f (“%d”, d);
}
void main( ){
count(3);
}
-
- 3 1 2 2 1 3 4 4 4
- 3 1 2 1 1 1 2 2 2
- 3 1 2 2 1 3 4
- 3 1 2 1 1 1 2
- 3 1 2 2 1 3 4 4 4
Correct Option: A
Output will be 312213444.