Structure MCQ Questions and Answers

Home | C Language | Structure

In this section we provide lots of objective question of Structure

Page: 1/2

1) How will you free the allocated memory ?

2) What is the similarity between a structure, union and enumeration?

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);
}

Download MCQ PDF