GATE Computer Science (CS) 2017 Shift 1 Solved Paper
© examsiri.com
Question : 45 of 65
Marks:
+1,
-0
Consider the following two functions.
The output printed when fun1 (5) is called is
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
Go to Question: