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...

#include<stdio.h>
void main()
{
int a=5,b=6,c;
int x=(a<b)+7;
int y=(x==7)*9;
int z=(c=x+y)*2;
printf("%h %h %h",x,y,z);
}
What is the output? Explain it.

Answer Posted / seema choudhary

output:

x=8
y=0
z=16

x=8 because (a<b) condition is true, it return 1 means non
zero, then 1+7=8

y=0 because (x==7) condition is false return 0. then 0*9=0

z=16 because x=8,y=0 then 8+0=8*2=16

Is This Answer Correct ?    12 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is swift based on c?

1104


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1059


What do you mean by c what are the main characteristics of c language?

1031


Are the expressions * ptr ++ and ++ * ptr same?

1149


Explain what is meant by 'bit masking'?

1193


Why we use void main in c?

1164


When is a “switch” statement preferable over an “if” statement?

1143


What is the difference between arrays and pointers?

1126


Why C language is a procedural language?

1024


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

5232


Do you know the purpose of 'register' keyword?

1019


What's the right way to use errno?

1142


In a switch statement, what will happen if a break statement is omitted?

1059


What the different types of arrays in c?

1065


how logic is used

1966