#include<stdio.h>
int main()
{ int i=0,j=1,k=2,m,n=0;
m=i++&&j++&&k++||n++;
printf("%d,%d,%d,%d,%d",i,j,k,m,n);
}
Answers were Sorted based on User's Feedback
Answer / g krishna rao
1,1,2,0,1
when it encounters zero it will not check remaining conditions
and go to or conditions and incriment n
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / manish soni tagore collage jai
m=i++&&j++&&k++||n++;
in this expression
first
m=0++&&...........
from rule of && opr c1&&c2
if c1 is 0(FLASE) it don't chacke the next expression
so
m=0---------------(1);
after this
m=i++&&j++&&k++||n++;
-----------------------
m=i++&&j++&&k++ is flase so only i is increase by and j and
k not effect.
-------------------------------
after that
in ||(OR )OPR
C1||C2
IF C1 IS 0(FALSE) THEN IT CHECK THE C2
m=i++&&j++&&k++(C1)||n++(C2);
THEN C1 IS 0 and c2 is 0++ is 1 so true.
so answer is
1,same,same,0,i,
| Is This Answer Correct ? | 4 Yes | 4 No |
Answer / kishore krishnan.s.r
Its actually a doubt
Since ++ has high precidence than && will it not be evaluated first.
then ans will be 1,2,3,0,1
| Is This Answer Correct ? | 0 Yes | 1 No |
What is c preprocessor mean?
while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.
yogesh patil in dell
Give me basis knowledge of c , c++...
Why use int main instead of void main?
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
what is the difference between global variable & static variable declared out side all the function in the file.
What are local static variables? How can you use them?
What will be your course of action for a push operation?
What are different types of variables in c?
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer
What is function pointer and where we will use it