Friday 20 November 2009

C questions with answer

Variable naming rule in c programming language:
(q) What will be output of the following program?
void main()
{
char * emp name=”raja”;
printf("%s",emp name);
getch();
}
Output: Compilation error
Explanation:
Error: Invalid variable name. Except underscore there should not be any special character in name of variable event blank space.
(q) What will be output of the following program?
void main()

No comments:

Post a Comment