CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following C program:
int x = 0;
void main( )
{
int y = x;
if (x++ < 2)
{
printf ("%d"',x);
main ( );
}
printf ("%d"',y)
}

What is the output of above code?


A
11201
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
01221
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
12210
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
02100
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C 12210
option (c)


Output : 12210

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Algebra of Complex Numbers
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon