adplus-dvertising
frame-decoration

Question

What is the output of this C code?
#include <stdio.h>
#define foo(m, n) m * n = 10
int main()
{
    printf("in main\n");
}

a.

In main

b.

Compilation error as lvalue is required for the expression m*n=10

c.

Preprocessor error as lvalue is required for the expression m*n=10

d.

None of the mentioned

Posted under C Programming

Answer: (a).In main

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this C code? #include <stdio.h> #define foo(m, n) m * n = 10 int main() { printf("in main\n"); }

Similar Questions

Discover Related MCQs

Q. C preprocessor is conceptually the first step during compilation

Q. Preprocessor feature that supply line numbers and filenames to compiler is called?

Q. A preprocessor is a program

Q. Which of the following are C preprocessors?

Q. #pragma exit is primarily used for?

Q. The C-preprocessors are specified with _________symbol.

Q. The preprocessor provides the ability for _______________

Q. What is the sequence for preprocessor to look for the file within <> ?

Q. Can function definition be present in header files?

Q. If the file name is enclosed in double quotation marks

Q. If the file name is enclosed in angle brackets

Q. Which of the following names for files not accepted?

Q. What is the advantage of #define over const?

Q. Which of the following properties of #define not true?

Q. The “else if” in conditional inclusion is written by?

Q. Which of the following sequences are unaccepted in C language?

a) #if
#else
#endif

b) #if
#elif
#endif

c) #if
#if
#endif

d) #if
#undef
#endif

Q. In a conditional inclusion, if the condition that comes after the if holds.

Q. Conditional inclusion can be used for

Q. The #elif directive cannot appear after the preprocessor #else directive

Q. For each #if, #ifdef, and #ifndef directive