C Language MCQ - English
What is the similarity between a structure, union and enumeration?
Answer : B
View More Related Question
1) Number of bytes in memory taken by the below structure is
#include <stdio.h>
struct test {
int k;
char c;
};
View Answer
2) What is the output of this C code(according to C99 standard)?
#include <stdio.h>
struct p {
int k;
char c;
float f;
};
int main()
{
struct p x = {.c = 97, .f = 3, .k = 1};
printf("%f\n", x.f);
}
3) What is the output of this C code?
#include <stdio.h>
struct student
{
int no = 5;
char name[20];
};
void main()
{
struct student s;
s.no = 8;
printf("hello");
}
4) What is the similarity between a structure, union and enumeration?
View Answer
5) Which of the following are themselves a collection of different data types?