Will it result in to an error if a header file is included twice?
Answer: C
Unless the header file has taken care to ensure that if already included it doesn't get included again.
Turbo C, GCC compilers would take care of these problems, generate no error.
Will the following program print the message infinite number of times?
#include
#define INFINITELOOP while(1)
int main()
{
INFINITELOOP
printf("IndiaBIX");
return 0;
}
Answer: A
No answer description available for this question.
Will the program compile successfully?
#include
int main()
{
#ifdef NOTE
int a;
a=10;
#else
int a;
a=20;
#endif
printf("%d\n", a);
return 0;
}
Answer: A
No answer description available for this question.
It is necessary that a header files should have a .h extension?
Answer: B
No, the header files have any kind of extension.
Will the program compile successfully?
#include
int main()
{
printf("India" "BIX\n");
return 0;
}
Answer: A
Yes, It prints "IndiaBIX"