C Programming MCQ

1: The program fragment int i = 263 ; putchar (i) ; prints
A. 263
B. ASCII equivalent of 263
C. rings the bell
D. garbage
 

Answer : 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 !

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.