41. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 1;
if (i++ && (i == 1))
printf("Yes\n");
else
printf("No\n");
}
#include <stdio.h>
int main()
{
int i = 1;
if (i++ && (i == 1))
printf("Yes\n");
else
printf("No\n");
}
42. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = -5;
int k = (a++, ++a);
printf("%d\n", k);
}
#include <stdio.h>
void main()
{
int a = -5;
int k = (a++, ++a);
printf("%d\n", k);
}
43. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
int j = i++ + i;
printf("%d\n", j);
}
#include <stdio.h>
int main()
{
int i = 0;
int j = i++ + i;
printf("%d\n", j);
}
44. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int var = 010;
printf("%d", var);
}
#include <stdio.h>
int main()
{
int var = 010;
printf("%d", var);
}
45. The keyword typedef cannot be used to give alias names to pointers.
46. What will be the output of the following C code if the code is executed on a 32 bit platform?
#include <stdio.h>
enum India
{
c = 0,
d = 10,
h = 20,
s = 3
} a;
int main()
{
a = c;
printf("Size of enum variable = %d bytes", sizeof(a));
return 0;
}
#include <stdio.h>
enum India
{
c = 0,
d = 10,
h = 20,
s = 3
} a;
int main()
{
a = c;
printf("Size of enum variable = %d bytes", sizeof(a));
return 0;
}
47. What will be the output of the following C function?
#include <stdio.h>
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
exit(0);
printf("%d\n", i);
return reverse(i++);
}
#include <stdio.h>
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
exit(0);
printf("%d\n", i);
return reverse(i++);
}
48. What will be the output of the following C code?
#include<stdio.h>
enum India
{
a=1,b,c,d,e
};
int main()
{
printf("%d",b*c+e-d);
}
#include<stdio.h>
enum India
{
a=1,b,c,d,e
};
int main()
{
printf("%d",b*c+e-d);
}
49. C99 standard guarantees uniqueness of . . . . . . . . characters for external names.
50. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int a = -5;
int k = (a++, ++a);
printf("%d\n", k);
}
#include <stdio.h>
void main()
{
int a = -5;
int k = (a++, ++a);
printf("%d\n", k);
}
Read More Section(C Fundamentals)
Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.