C | Macro & Preprocessor | Question 15

What is the output for the following code snippet?

filter_none

edit
close

play_arrow

link
brightness_4
code

#include<stdio.h>
#define A -B
#define B -C
#define C 5
  
int main()
{
  printf("The value of A is %d\n", A); 
  return 0;
}

chevron_right


This question is contributed by Aastha Anand.
(A) The value of A is 4
(B) The value of A is 5
(C) Compilation Error
(D) Runtime Error


Answer: (B)

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post



My Personal Notes arrow_drop_up