CP CVDT Q6

0. The program fragment
int i = 263 ;
putchar (i) ;
prints

  • Option : C
  • Explanation :
    263 in binary form is 100000111. If one tries to print an integer as a character, only the last 8 bits will be considered - the rest chopped off. So, in this case, the ASCII value of 00000111 will be printed, Look in the ASCII table. It is ringing a bell!
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *