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 is context in c?

930


Why we use stdio h in c?

1043


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2645


Why do we use stdio h and conio h?

1095


What are the 5 organizational structures?

1033


Can two or more operators such as and be combined in a single line of program code?

1376


why we wont use '&' sing in aceesing the string using scanf

2375


What are the different types of control structures?

1048


What is 2c dna?

1086


What is c token?

1077


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1007


What is c system32 taskhostw exe?

1032


What are all different types of pointers in c?

1012


What are valid signatures for the Main function?

1241


What are shell structures used for?

1057