Thursday 10 September 2009

C programming good questions with answer

(q) What will be output of the following program ?void main(){int x=012,y;clrscr();y=++x- ~x+4?5:6;printf("%#X %x",y,y);getch();}Output: 0X5 5Explanation:012 is octal number because it is staring with number zero. %x, %X is used for to print the number in hexadecimal format. # indicates output should in the format: 0x number.(q) What will be output of the following program?void main(){int x=0x12,

No comments:

Post a Comment