Top

Discussion

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

  • A.263
  • B.ASCII equivalent of 263
  • C.rings the bell
  • D.garbage

Answer: C

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

No comment is present. Be the first to comment.
Loading…

Post your comment