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


Please Help Members By Posting Answers For Below Questions

What is time complexity c?

575


What is multidimensional arrays

637


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1773


what are non standard function in c

1443


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

1478






What is the right type to use for boolean values in c?

589


What does *p++ do? What does it point to?

624


What is substring in c?

645


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

626


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

654


What does 2n 4c mean?

729


What is difference between scanf and gets?

619


What is a 'null pointer assignment' error?

731


What is the use of f in c?

563


hi, which software companys will take,if d candidate's % is jst 55%?

1671