Thursday, September 10, 2009

C language questions and answer

(q) What will be output of the following program?void main(){char * __TIME__="world";clrscr();printf("%s ",__TIME__);getch();}Output: Compilation errorExplanation:__TIME__ is valid identifier in c programming language but it is predefine global identifier .So a variable not should not be global identifier like __TIME__, __DATE___, __FILE__ etc.

No comments:

Post a Comment