What will be the output of the following C code?
#include < stdio.h >
#define foo(m, n) ” m ## n “
int main()
{
printf(“%s\n”, foo(k, l));
}
a) k l
b) kl
c) Compile time error
d) m ## n
Answer: d
Related Posts
Which function is used to check whether a character is a tab or space?
Which function is used to check whether a character is a number?
Which function is used to check whether a character is an alphabet or number?
Which function is used to check whether a character is an alphabet?
What we can’t do on a void pointer?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 5, c;
void *p = & a;
double b = 3.14;
p = & b;
c = a + b;
cout << c << ‘\n’ << p;
return 0;
}What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int n = 5;
void *p = & n;
int *pi = static_cast< int*>(p);
cout << *pi << endl; return 0; }
Join The Discussion