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

What are structural members?

955


With the help of using classes, write a program to add two numbers.

986


Are there any problems with performing mathematical operations on different variable types?

993


Is c high or low level?

968


Why c is called free form language?

971


What are the disadvantages of external storage class?

1007


Explain output of printf("Hello World"-'A'+'B'); ?

1434


Explain what is the advantage of a random access file?

1068


How reliable are floating-point comparisons?

1040


What is the purpose of sprintf() function?

1056


What is atoi and atof in c?

1031


What are local variables c?

963


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

1016


Explain what are the advantages and disadvantages of a heap?

1036


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2030