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 / vint

int main()
{
int x = 10, y = 5;
if(x==10)
else if(x==9)
else y=8;
printf("%d",y);
return 0;
}
error: expected expression before 'else'

------------
int main()
{
int x = 10, y = 5;
if(x==10) {}
else if(x==9) {}
else {y=8;}
printf("%d",y);
return 0;
}

OP: 5

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 1f stand for?

719


Explain what’s a signal? Explain what do I use signals for?

686


What is formal argument?

752


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

772


How are 16- and 32-bit numbers stored?

840






What does it mean when a pointer is used in an if statement?

704


What is the use of a ‘’ character?

688


What is getch?

718


How can I invoke another program or command and trap its output?

726


what is different between auto and local static? why should we use local static?

741


Why static is used in c?

718


Is main an identifier in c?

701


What does static variable mean in c?

755


what is uses of .net

1361


explain what is fifo?

724