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
Who invented bcpl language?
Compare array data type to pointer data type
What oops means?
What is strcmp in c?
Difference between exit() and _exit() function?
Is it possible to pass an entire structure to functions?
Explain why can’t constant values be used to define an array’s initial size?
What is the data segment that is followed by c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is malloc() function?
What is #line in c?
Why main function is special give two reasons?
Why is it that not all header files are declared in every C program?
What is union and structure?
What are local variables c?