Page 1 of 1

What will be the output of the following C code if the value of ‘p’ is 10 and that of ‘q’ is 15?

Posted: Wed Jul 13, 2022 7:56 pm
by answerhappygod
#include<stdio.h>
int main()
{
int p,q;
printf("Enter two numbers\n");
scanf("%d",&p);
scanf("%d",&q);
#if(4<2)
printf("%d",p);
#elif(2>-1)
printf("%d",q);
#else
printf("bye");
#endif
}
a) 10
b) 15
c) bye
d) error