Computer Sciences > Gate 2017 Set-1 > C Programming
Consider the following two functions
void fun1(int n){
    if(n == 0) return;
      printf(“%d”, n);
    fun2(n-2);
    printf(“%d”, n);
}

void fun2(int n){
    if(n == 0) return;
      printf(“%d”, n);
      fun1(++n);
      printf(“%d”, n);
}

The output printed when fun1 (5) is called is
A
53423122233445
B
53423120112233
C
53423122132435
D
53423120213243

Correct : C Programming

Similar Questions

Consider the C functions foo and bar given below: int foo(int val) {     int x = 0;     while (val > 0)     {     &nbs...
#190 MCQ
What is printed by the following ANSI C program? #include<stdio.h> int main(int argc, char *argv[]) {     int a[3][3][3] =     {{...
#311 MCQ
Consider the following C program: #include<stdio.h> int main() {     int a[] = {2, 4, 6, 8, 10};     int i, sum = 0, *b = a + 4; &...
#612 Fill in the Blanks

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......