C Language MCQ - English
Structure MCQ Questions and Answers
Home | C Language | StructureIn this section we provide lots of objective question of Structure
1) How will you free the allocated memory ?
2) What is the similarity between a structure, union and enumeration?
Answer : B Discuss
3) Which of the following are themselves a collection of different data types?
4) User-defined data type can be derived by___________
5) Which operator connects the structure name to its member name?
6) Which of the following cannot be a structure member?
7) What is the output of this C code?
#include <stdio.h>
struct student {
int no;
char name[20];
}
void main()
{
struct student s;
s.no = 8;
printf("hello");
}
8) 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");
}
9) What is the output of this C code?
#include <stdio.h>
struct student {
int no;
char name[20];
};
void main()
{
student s;
s.no = 8;
printf("hello");
}
10) What is the output of this C code?
#include <stdio.hgt;
void main()
{
struct student {
int no;
char name[20];
};
struct student s;
s.no = 8;
printf("%d", s.no);
}