Thursday, September 10, 2009

questions of c coding and answer

(q) What will be output of the following program ?#includevoid main(){char a='\12';char *str1="cquestion",*str2="bank";clrscr();printf("%s%c%s",str1,a,str2);getch();}Output: cquestionbankExplanation:�\12� represents octal 12 i.e. decimal 10 which is ASCII code of new line character i.e. sends the cursor to next line(q) What will be output of the following program?#includevoid

No comments:

Post a Comment