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 is volatile variable how do you declare it?
What is conio h in c?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
Here is a neat trick for checking whether two strings are equal
What does volatile do?
What is the purpose of & in scanf?
In which language linux is written?
What is build process in c?
Why c is faster than c++?
In C, What is the #line used for?
What is an lvalue?
How do you print an address?
How to write a code for reverse of string without using string functions?
What is the best organizational structure?
Explain about the functions strcat() and strcmp()?