LanguagesC & C Plus Plus [3i Infotech Placement]: Sample Questions 174  176 of 354
Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more for all subjects of your exam.
Question 174
C & C Plus Plus
Explanation
 In a program They are asking to print ( “% x” 1 << 4) ;
 let՚s take this answer given written the 1 in 16 bits
0000 0000 0000 0001
 1 can be written in 2՚s complement no system as
1111 1111 1111 1111
 “<<” this operator is called Binary Left Shift Operator, so we have to left shift four times the least significant 4 bits are filled with 0՚s
1111 1111 1111 0000
 Here (1111 = F, 1111 = F, 1111, F0000 = 0)
 So the Answer is FFF0
Question 175
Question 176
C & C Plus Plus
Edit
Describe in Detail
Essay▾What is the output of the following program?
main ()
{
int i =3;
for(;i++=0;)
printf(“%d”, i);
}
Explanation
Compiler Error: Lvalue required.
In the program
int i = 3; 

for (; i ++ = 0;) 
