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 error
Explanation:
__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: