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
What are the 4 types of unions?
Is python a c language?
Explain the difference between #include "..." And #include <...> In c?
What is c basic?
What are the advantage of c language?
What is variable and explain rules to declare variable in c?
What is integer constants?
Explain the properties of union.
How do you use a pointer to a function?
ATM machine and railway reservation class/object diagram
Why is c fast?
Mention four important string handling functions in c languages .
Can main () be called recursively?
Can a variable be both static and volatile in c?
Is there anything like an ifdef for typedefs?