Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is property type c?

1047


Combinations of fibanocci prime series

1557


What is zero based addressing?

1112


What are the advantages of the functions?

1099


What is the use of putchar function?

1011


How can my program discover the complete pathname to the executable from which it was invoked?

1037


Is python a c language?

951


Can a variable be both static and volatile in c?

975


What are the three constants used in c?

933


What are the rules for identifiers in c?

1032


What does volatile do?

939


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1927


How can I open a file so that other programs can update it at the same time?

1134


Do you know the use of 'auto' keyword?

1131


How can I handle floating-point exceptions gracefully?

1110