0 votes 0 votes Let X be the number of times the comparison inside the while loop (i.e. m <= n ) is performed, when mystery(127, 255) is called. Then the value of X is, 125 65 64 66 Programming in C programming-in-c + – balchandar reddy san asked Jan 20, 2019 balchandar reddy san 510 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments aditya333 commented Jan 20, 2019 reply Follow Share exactly 0 votes 0 votes srestha commented Jan 20, 2019 reply Follow Share yes ,for 127 to 255, there are 129 number instead of 128 numbers Now for 128 numbers there are 64 comparisons And for 129 th , when m and n at same location there will be one comparison Since this condition is true For condition to be false, there will be 1 more comparison 0 votes 0 votes teja1521 commented Feb 11, 2019 i edited by teja1521 Feb 22, 2019 reply Follow Share for m=127 and n=255, it is a 1 comparison and from 128 to 191 there are 64 comparisons between m and n. Now both m and n collide at 191 and for m=192 and n=190 there is a comparison which terminates loop. so answer is 1+64+1=66. 0 votes 0 votes Please log in or register to add a comment.