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

write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1939


How do I use strcmp?

1072


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3683


What does main () mean in c?

1093


Is c programming hard?

1012


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

1027


Write a program to swap two numbers without using third variable in c?

1126


What is nested structure with example?

1067


How can I swap two values without using a temporary?

1097


What is the right type to use for boolean values in c?

1028


Why isn't any of this standardized in c? Any real program has to do some of these things.

1198


What are the advantages of using new operator as compared to the function malloc ()?

1325


How can a program be made to print the name of a source file where an error occurs?

1214


What is the function of multilevel pointer in c?

1077


What do the functions atoi(), itoa() and gcvt() do?

1177