CP I/O Q40

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

  • Option : C
  • Explanation :
    263 in binary form is 100000111.
    If one tries to print an integer as character, only the last 8 bits will be considered-the rest chopped off.
    So, in this case the ASCII value of 00000111 (i.e., decimal 7) will be printed. Look at 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 *