wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

What is the output of the following program?

# include <stdio.h> void fun(int x) {if (x > 0){fun(x - 1);printf("%d," x);fun(x - 1);}} int main( ) { fun(3); return 0; }

A
1212121
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
121121
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
1214121
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
1213121
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Join BYJU'S Learning Program
CrossIcon