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 the correct code to have following output in c using nested for loop?

1048


Give basis knowledge of web designing ...

1998


regarding pointers concept

2005


Who developed c language?

1056


What is the general form of a C program?

1000


Explain the difference between strcpy() and memcpy() function?

969


What is the use of printf() and scanf() functions?

1096


Disadvantages of C language.

1070


Why are all header files not declared in every c program?

1071


How can I discover how many arguments a function was actually called with?

1044


What does c mean in standard form?

1137


What does node * mean?

1167


provide an example of the Group by clause, when would you use this clause

2161


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1188


What is a macro?

1074