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
What does 1f stand for?
Explain what’s a signal? Explain what do I use signals for?
What is formal argument?
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
How are 16- and 32-bit numbers stored?
What does it mean when a pointer is used in an if statement?
What is the use of a ‘ ’ character?
What is getch?
How can I invoke another program or command and trap its output?
what is different between auto and local static? why should we use local static?
Why static is used in c?
Is main an identifier in c?
What does static variable mean in c?
what is uses of .net
explain what is fifo?