71. What will be the output of the following C code?
#include <stdio.h>
int main()
{
enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
printf("PEACH = %d\n", PEACH);
}
#include <stdio.h>
int main()
{
enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
printf("PEACH = %d\n", PEACH);
}
72. Which of the following is possible with any 2 operators in C?
73. What will be the output of the following C code?
#include <stdio.h>
void main()
{
double b = 5 % 3 & 4 + 5 * 6;
printf("%lf", b);
}
#include <stdio.h>
void main()
{
double b = 5 % 3 & 4 + 5 * 6;
printf("%lf", b);
}
74. What will be the output of the following C code? (Initial values: x= 7, y = 8)
#include <stdio.h>
void main()
{
float x;
int y;
printf("enter two numbers \n");
scanf("%f %f", &x, &y);
printf("%f, %d", x, y);
}
#include <stdio.h>
void main()
{
float x;
int y;
printf("enter two numbers \n");
scanf("%f %f", &x, &y);
printf("%f, %d", x, y);
}
75. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 4, y, z;
y = --x;
z = x--;
printf("%d%d%d", x, y, z);
}
#include <stdio.h>
void main()
{
int x = 4, y, z;
y = --x;
z = x--;
printf("%d%d%d", x, y, z);
}
76. Which of the following is not a valid variable name declaration?
77. Comment on the behaviour of the following C code?
#include <stdio.h>
int main()
{
int i = 2;
i = i++ + i;
printf("%d\n", i);
}
#include <stdio.h>
int main()
{
int i = 2;
i = i++ + i;
printf("%d\n", i);
}
78. What will be the output of the following C code?
#include<stdio.h>
enum colour
{
blue, red, yellow
};
main()
{
enum colour c;
c=yellow;
printf("%d",c);
}
#include<stdio.h>
enum colour
{
blue, red, yellow
};
main()
{
enum colour c;
c=yellow;
printf("%d",c);
}
79. What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 8;
int x = 0 == 1 && k++;
printf("%d%d\n", x, k);
}
#include <stdio.h>
void main()
{
int k = 8;
int x = 0 == 1 && k++;
printf("%d%d\n", x, k);
}
80. Which of the following is not a pointer declaration?
Read More Section(C Fundamentals)
Each Section contains maximum 100 MCQs question on C Fundamentals. To get more questions visit other sections.