What will be the output of the following C code?
#include <stdio.h>
#define p( n,m ) printf( "%d", m##n )
#define q(a,b) printf("%d",a##b)
main()
{
p(3,4);
q(5,6);
}
#include <stdio.h>
#define p( n,m ) printf( "%d", m##n )
#define q(a,b) printf("%d",a##b)
main()
{
p(3,4);
q(5,6);
}
A. 4356
B. 3456
C. 4365
D. 3465
Answer: Option A
Related Questions on C Preprocessor
What is the purpose of the C preprocessor in C programming?
A. Compile C code
B. Optimize code
C. Preprocess code before compilation
D. Execute code
A. #define
B. #include
C. #ifdef
D. #pragma
What is the purpose of the #define directive in C preprocessing?
A. To include a header file
B. To define a macro
C. To declare a constant
D. To declare a variable
In C, which directive is used to conditionally include code based on preprocessor macros?
A. #ifdef
B. #ifndef
C. #if
D. #else
Join The Discussion