what is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
elae y=8;
a.9
b.8
c.6
d.7

Answer Posted / prakash

I'm getting "error C2181: illegal else without matching if".
If that is corrected then the output will be y = 5.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include stdio h?

673


What are the different types of endless loops?

610


Which header file is essential for using strcmp function?

930


Which built-in library function can be used to match a patter from the string?

732


the question is that what you have been doing all these periods (one year gap)

1611






What is the value of uninitialized variable in c?

562


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

1950


What is #include conio h?

584


What is typedf?

662


What is the purpose of & in scanf?

586


What is adt in c programming?

599


What are the differences between Structures and Arrays?

596


What happens if you free a pointer twice?

595


How do you do dynamic memory allocation in C applications?

624


What is #line in c?

554