Menu mobile
Home
PYTHON
Python Tutorial
Program Example
Interview Questions
JAVA
Java Tutorial
Program Example
Interview Questions
C Language
C Tutorial
Program Example
Interview Questions
Web Design
HTML
CSS
Java Script
PHP
Assignment
MS Office
HTML
CSS
Java Script
QUIZ ON : C LANGUAGE - STRUCTURE AND UNION
STRUCTURE AND UNION
00:00:00
English
Hindi
Question No# :
01
out of 26
Which of the following cannot be a structure member?
निम्नलिखित में से कौन एक संरचना सदस्य नहीं हो सकता है?
A.
Another structure
B.
Function
C.
Array
D.
None of the mentioned
Question No# :
02
out of 26
All the members of a union should be of same type.
All the members of a union should be of same type.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
03
out of 26
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# :
04
out of 26
Which of the following is a User-defined data type?
Which of the following is a User-defined data type?
A.
typedef int Boolean;
typedef int Boolean;
B.
typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;
typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;
C.
struct {char name[10], int age};
struct {char name[10], int age};
D.
all of the mentioned
all of the mentioned
Question No# :
05
out of 26
Size of all elements in a union should be same.
Size of all elements in a union should be same.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
06
out of 26
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# :
07
out of 26
Which of the data types has the size that is variable?
Which of the data types has the size that is variable?
A.
int
int
B.
struct
struct
C.
float
float
D.
double
double
Question No# :
08
out of 26
In a union, space is allocated to every member individually.
In a union, space is allocated to every member individually.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
09
out of 26
Which of the following is a properly defined struct?
Which of the following is a properly defined struct?
A.
struct {int a;}
B.
struct a_struct {int a;}
C.
struct a_struct int a;
D.
struct a_struct {int a;};
Question No# :
10
out of 26
A structure can contain similar or dissimilar elements
A structure can contain similar or dissimilar elements
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
11
out of 26
The memory required in structure is less than union.
The memory required in structure is less than union.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
12
out of 26
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
TRUE
B.
FALSE
FALSE
Question No# :
13
out of 26
Which operator connects the structure name to its member name?
कौन सा ऑपरेटर संरचना के नाम को उसके सदस्य के नाम से जोड़ता है?
A.
- (Minus)
B.
<- (Left Arrow)
C.
. (Dot)
D.
Both <- and .
Question No# :
14
out of 26
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
TRUE
B.
FALSE
FALSE
Question No# :
15
out of 26
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
TRUE
B.
FALSE
FALSE
Question No# :
16
out of 26
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# :
17
out of 26
The memory required in structure is less than union.
The memory required in structure is less than union.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
18
out of 26
A structure can contain pointer to itself.
A structure can contain pointer to itself.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
19
out of 26
Which of the following accesses a variable in structure b?
Which of the following accesses a variable in structure b?
A.
b->var;
B.
b.var;
C.
b-var;
D.
b>var;
Question No# :
20
out of 26
Structures can have bit fields.
Structures can have bit fields.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
21
out of 26
enum types are processed by _________
enum types are processed by _________
A.
Compiler
Compiler
B.
Preprocessor
Preprocessor
C.
Linker
Linker
D.
Assembler
Assembler
Question No# :
22
out of 26
A structure can contain similar or dissimilar elements.
A structure can contain similar or dissimilar elements.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
23
out of 26
Which properly declares a variable of struct Student?
Which properly declares a variable of struct Student?
A.
struct stu;
B.
struct Student stu;
C.
stu;
D.
int stu
Question No# :
24
out of 26
User-defined data type can be derived by
उपयोगकर्ता द्वारा परिभाषित डेटा प्रकार द्वारा प्राप्त किया जा सकता है
A.
struct
B.
enum
C.
typedef
D.
all of the mentioned
Question No# :
25
out of 26
All the members of a union share the same memory location.
All the members of a union share the same memory location.
A.
TRUE
TRUE
B.
FALSE
FALSE
Question No# :
26
out of 26
Which of the following are themselves a collection of different data types?
निम्नलिखित में से कौन स्वयं विभिन्न डेटा प्रकारों का एक संग्रह है?
A.
string
B.
structures
C.
char
D.
all of the mentioned
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Naukari Notification
Best Website and Software Company in Allahabad
Website development Company in Allahabad