Thursday 13 September 2007

C best language questions and answer

(q) What will be output of the following program ?   #include"stdio.h" void  main(){ char a='\377'; clrscr(); printf(2+"%d%o",a); getch();   }   output:177777 Explanation: ‘\377’ is octal character constant. %o is used to print octal number system. (q) What will be output of the following program ?   #include"stdio.h" void  main(){ char a='\378'; clrscr(); printf("%o",a);

No comments:

Post a Comment