All macro substitutions in a program are done?
Answer: A
No answer description available for this question.
Enter details here
Predict the output of following program?
#include
#define MAX 1000
int main()
{
int MAX = 100;
printf("%d ", MAX);
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
Which of the following are correctly formed #define statements?
Answer: D
No answer description available for this question.
Enter details here
#include
#define get(s) #s
int main()
{
char str[] = get(GeeksQuiz);
printf("%s", str);
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
Nested macros are allowed.
Answer: B
No answer description available for this question.
Enter details here
Which statment is true about the given code ?
#include
enum colors {lets,find,course};
int main()
{
printf("%d %d %d",course,lets,find);
return 0;
}
Answer: C
enum assigns numbers starting from 0, if not explicitly defined by some other integer.
Enter details here
Will the program compile successfully?
#include
int main()
{
printf("India" "BIX\n");
return 0;
}
Answer: A
Yes, It prints "IndiaBIX"
Enter details here
The preprocessor directive which checks whether a constant expression results in a zero or non-zero value __________
Answer: A
#if checks whether a constant expression results in zero or not. If the expression is a non-zero value, then the statements between #if and #endif will be executed. If the constant expression results in a zero value, the statements between #if and #endif will not be executed.
Enter details here
What is the Error of this program?
#include
#define CONDITION(x)
printf("letsfindcourse");
int main()
{
CONDITION(0);
return 0;
}
Answer: B
#define CONDITION(x) must be terminated my backslash () to follow the next line.
Enter details here