41. 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));
}
#include <stdio.h>
#define foo(m, n) " m ## n "
int main()
{
printf("%s\n", foo(k, l));
}
42. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int one = 1, two = 2;
#ifdef next
one = 2;
two = 1;
#endif
printf("%d, %d", one, two);
}
#include <stdio.h>
int main()
{
int one = 1, two = 2;
#ifdef next
one = 2;
two = 1;
#endif
printf("%d, %d", one, two);
}
43. If the file name is enclosed in angle brackets, then . . . . . . . .
44. What will be the output of the following C code?
#include <stdio.h>
void m()
{
printf("hi");
}
void main()
{
m();
}
#include <stdio.h>
void m()
{
printf("hi");
}
void main()
{
m();
}
45. What will be the output of the following C code?
#include <stdio.h>
void func();
int main()
{
static int b = 20;
func();
}
void func()
{
static int b;
printf("%d", b);
}
#include <stdio.h>
void func();
int main()
{
static int b = 20;
func();
}
void func()
{
static int b;
printf("%d", b);
}
46. What will be the output of the following C code?
#include <stdio.h>
int *i;
int main()
{
if (i == 0)
printf("true\n");
return 0;
}
#include <stdio.h>
int *i;
int main()
{
if (i == 0)
printf("true\n");
return 0;
}
47. What will be the output of the following C code?
#include <stdio.h>
void main()
{
#define max 37;
printf("%d", max);
}
#include <stdio.h>
void main()
{
#define max 37;
printf("%d", max);
}
48. What will be the output of the following C code?
#include <stdio.h>
#define Cprog
int main()
{
int a = 2;
#ifdef Cprog
a = 1;
printf("%d", Cprog);
}
#include <stdio.h>
#define Cprog
int main()
{
int a = 2;
#ifdef Cprog
a = 1;
printf("%d", Cprog);
}
49. The "else if" in conditional inclusion is written by?
50. What will be the output of the following C code?
#include <stdio.h>
int *i;
int main()
{
if (i == NULL)
printf("true\n");
return 0;
}
#include <stdio.h>
int *i;
int main()
{
if (i == NULL)
printf("true\n");
return 0;
}
Read More Section(Function)
Each Section contains maximum 100 MCQs question on Function. To get more questions visit other sections.