main() {
int x=2, y=4
if ((x==2||y==4)
x++
y++
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
What is the output?
Answer Posted / moolshankershukla
if use terminator after x++ and y++ and y=4 and ) missing
and {} missing then out put is
x=8 and y=6.
correct answer like this :
main ()
{
int x=2, y=4;
if ((x==2||y==4))
{
x++;
y++;
}
if (y==4+1)
{
x=x+y;
}
y++;
printf("The values of x and y are %d and %d."x,y);
}
out put is
x=8 and y=6.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is property type c?
Combinations of fibanocci prime series
What is zero based addressing?
What are the advantages of the functions?
What is the use of putchar function?
How can my program discover the complete pathname to the executable from which it was invoked?
Is python a c language?
Can a variable be both static and volatile in c?
What are the three constants used in c?
What are the rules for identifiers in c?
What does volatile do?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
How can I open a file so that other programs can update it at the same time?
Do you know the use of 'auto' keyword?
How can I handle floating-point exceptions gracefully?