#define display(text) printf(#text "@")
main()
{
display(hello.);
display(good morning!);
}Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
93
Questions
4/5
Page
Pick an option on a question to see the right answer and solution.
#define display(text) printf(#text "@")
main()
{
display(hello.);
display(good morning!);
}Select an option to see the answer and solution.
#include <stdio.h>
#define p( n ) printf( "t%%\n" #n " = %d", t##n )
int t3=10;
int main()
{
int x;
x=p(3);
}Select an option to see the answer and solution.
#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);
}Select an option to see the answer and solution.
#include<stdio.h>
#define hello 10
void main()
{
printf("%d",hello);
#undef hello
printf("%d",hello);
}Select an option to see the answer and solution.
#include <stdio.h>
#define display( n ) printf( "a" #n " = %d", a##n )
int main()
{
display(3);
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include <stdio.h>
#define a 2
main()
{
int r;
#define a 5
r=a*2;
printf("%d",r);
}Select an option to see the answer and solution.
#include<stdio.h>
#define max 100
main()
{
#ifdef max
printf("hello");
}Select an option to see the answer and solution.
#include<stdio.h>
#define hello 10
main()
{
#ifdef hello
#undef hello
#define hello 100
#else
#define hello 200
#endif
printf("%d",hello);
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include<stdio.h>
void f()
{
#define sf 100
printf("%d",sf);
}
int main()
{
#define sf 99;
f();
printf("%d",sf);
}Select an option to see the answer and solution.
#define HELLO(a) #a
main()
{
printf(HELLO(good morning));
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
#include<stdio.h>
#define ram 10
main()
{
#ifdef ram
#define ram 20
#endif
printf("%d",ram);
}Select an option to see the answer and solution.