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 scope rule of function in c?

1150


What does 3 periods mean in texting?

1134


What is structure data type in c?

1069


How can a process change an environment variable in its caller?

1236


What are the 5 data types?

1211


How pointers are declared?

1011


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3967


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2128


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1166


What is pointers in c?

1167


Does c have function or method?

1063


What is meant by gets in c?

1266


What is the benefit of using #define to declare a constant?

1150


How does sizeof know array size?

1171


What is cohesion and coupling in c?

1096