C languages questions with answer

(q) What will be output of the following program?
void main()
{
long int _=5l;
printf("%ld",_);
getch();
}
Output: 5
Explanation:
Underscore is valid keyword in c.
(q) What will be output of the following program?
void  main(){
char * __WORLD__="world";
clrscr();
printf("%s ",__WORLD__);
getch();
}
Output: world
Explanation:
__WORLD__ is valid identifier in c programming language. But we should not write variable name in the forma like __xyx__, __TIME__. Why?

No comments: