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 i = -3,j=2,k=0,m;
m= ++i || ++j && ++k;
printf("%d%d%d",i,j,k,m);
}

Answer Posted / nidhi yadav

here logical && has higher priority than ||. so the block
(++j&&++k)will execute first and ans of this will be (3&&1=0)
since value increment first due to preincrement operator. now
the block(++i||0)will execute as (-2||0=1) since || opertor always gives true value except(0||0=0).
thus ans will be i=-2,j=3,k=1,m=1

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 types of unions?

1047


Is python a c language?

1020


Explain the difference between #include "..." And #include <...> In c?

1038


What is c basic?

1186


What are the advantage of c language?

1059


What is variable and explain rules to declare variable in c?

1104


What is integer constants?

1086


Explain the properties of union.

1091


How do you use a pointer to a function?

1093


ATM machine and railway reservation class/object diagram

5253


Why is c fast?

1074


Mention four important string handling functions in c languages .

1119


Can main () be called recursively?

1130


Can a variable be both static and volatile in c?

1052


Is there anything like an ifdef for typedefs?

1157