main()
{
int i = -3,j=2,k=0,m;
m= ++i || ++j && ++k;
printf("%d%d%d",i,j,k,m);
}
Answer Posted / ep
After the execution of the m evaluation the variables can be:
i = -2
j = 2
k = 0
m = 1
All of of this is because compilers do NOT completely
evalute expressions if they can short cut the evaluation.
Anyway, this is very bad programming.
| Is This Answer Correct ? | 18 Yes | 10 No |
Post New Answer View All Answers
Why are algorithms important in c program?
Write a code on reverse string and its complexity.
Does c have circular shift operators?
swap 2 numbers without using third variable?
What is string length in c?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What is volatile variable in c with example?
What is the function of volatile in c language?
Write a program that accept anumber in words
What is malloc() function?
Explain 'bus error'?
What is the correct declaration of main?
Is it possible to execute code even after the program exits the main() function?
Differentiate fundamental data types and derived data types in C.