adplus-dvertising
frame-decoration

Question

What is the output of this C code?
#include <stdio.h>
    #define SYSTEM 20
    int main()
    {
        int a = 20;
        #if SYSTEM == a
        printf("HELLO ");
        #endif
        #if SYSTEM == 20
        printf("WORLD\n");
        #endif
    }

a.

HELLO

b.

WORLD

c.

HELLO WORLD

d.

No Output

Posted under Functions C Programming

Answer: (b).WORLD

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 SYSTEM 20 int main() { int a = 20; #if SYSTEM == a printf("HELLO...

Similar Questions

Discover Related MCQs

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

Q. The #else directive is used for

Q. Use of functions

Q. Any C program

Q. What is function?

Q. The default parameter passing mechanism is

Q. Pick the correct statements.

I. The body of a function should have only one return statement.
II. The body of a function may have many return statements.
III. A function can return only one value to the calling environment.
IV. If return statement is omitted, then the function does its job but returns no value to the calling environment.

Q. Which of the following is a complete function?

Q. The recursive functions are executed in a ...........

Q. The function scanf() returns .........

Q. Functions have ..........

Q. Which of the following function calculates the square of 'x' in C?

Q. When a function is recursively called all the automatic variables are stored in a ..........

Q. Inner Block can access variables declared ___________.

Q. Can we declare same variable inside the inner and outer block ?