ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
MCQ C LANGUAGE - STRUCTURE AND UNION MCQ Questions
English
Hindi
Question No. -
11
Report Bug
What will be the output of the following code?
struct { int si;
double d;
float *cp; } s ;
void main() {
printf(“%d, %d, %d”, sizeof(s.d), sizeof(s.cp), sizeof(s)); }
What will be the output of the following code?
struct { int si;
double d;
float *cp; } s ;
void main() {
printf(“%d, %d, %d”, sizeof(s.d), sizeof(s.cp), sizeof(s)); }
A.
4, 4, 12
4, 4, 12
B.
8, 2, 12
8, 2, 12
C.
10, 4, 16
10, 4, 16
D.
8, 4, 14
8, 4, 14
Question No. -
12
Report Bug
What is the similarity between a structure, union and enumeration?
What is the similarity between a structure, union and enumeration?
A.
All of them let you define new values
All of them let you define new values
B.
All of them let you define new data types
All of them let you define new data types
C.
All of them let you define new pointers
All of them let you define new pointers
D.
All of them let you define new structures
All of them let you define new structures
Question No. -
13
Report Bug
The size of a structure can be determined by both size of variable name and size of (struct tag).
The size of a structure can be determined by both size of variable name and size of (struct tag).
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
14
Report Bug
Structures can have bit fields.
Structures can have bit fields.
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
15
Report Bug
In a union, space is allocated to every member individually.
In a union, space is allocated to every member individually.
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
16
Report Bug
Difference between structure and union is
Difference between structure and union is
A.
We can define functions within structures but not within a union
We can define functions within structures but not within a union
B.
We can define functions within union but not within a structure
We can define functions within union but not within a structure
C.
The way memory is allocated
The way memory is allocated
D.
There is no difference
There is no difference
Question No. -
17
Report Bug
Does the data type of all elements in the union will be same?
Does the data type of all elements in the union will be same?
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
18
Report Bug
typedef is used to give a new name to a known data type.
typedef is used to give a new name to a known data type.
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
19
Report Bug
All the members of a union share the same memory location.
All the members of a union share the same memory location.
A.
TRUE
सही
B.
FALSE
गलत
Question No. -
20
Report Bug
Which of the following are themselves a collection of different data types?
निम्नलिखित में से कौन स्वयं विभिन्न डेटा प्रकारों का एक संग्रह है?
निम्नलिखित में से कौन स्वयं विभिन्न डेटा प्रकारों का एक संग्रह है?
A.
string
B.
structures
C.
char
D.
all of the mentioned
1
2
3
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Exam Quiz
Website development Company in Allahabad