C Structure MCQ
Q1. What will be the size of the following structure? ,br>
#includestruct temp { int a[10]; char p; };
- 5
- 11
- 41
- 44
Answer:- (D).
Explanations :none.
Explanations :none.
- A structure is a collection of elements that can be of same datatype
- A structure is a collection of elements that can be of different datatype
- Elements of a structure are called members
- All of the these
Answer:- (D).
Explanations :none.
Explanations :none.
- C structure is always 128 bytes
- Size of C structure is the totatl bytes of all elements of structure
- Size of C structure is the size of largest elements
- None of the above
Answer:- (B).
Explanations :Individually calculate the sizes of each member of a structure and make a total to get Full size of a structure.
Explanations :Individually calculate the sizes of each member of a structure and make a total to get Full size of a structure.
int main() { struct ship { }; return 0; }
- It is wrong to define an empty structure
- Member variables can be added to a structure even after its first definition
- There is no use of defining an empty structure
- None of the above
Answer:- (B).
Explanations :none.
Explanations :none.
- Structure elements are stored on random free memory locations
- structure elements are stored in register memory locations
- structure elements are stored in contiguous memory locations
- None of the above
Answer:- (C).
Explanations :none.
Explanations :none.
- Derived data type
- Secondary data type
- Aggregate data type
- All the above
Answer:- (D).
Explanations :none.
Explanations :none.
- structure is used to implement Linked Lists, Stack and Queue data structures
- Structures are used in Operating System functionality like Display and Input taking
- Structure are used to exchange information with peripherals of PC
- All the above
Answer:- (D).
Explanations :none.
Explanations :none.
- A structure can contain same structure type member
- A structure size is limited by only physical memory of that PC
- You can define an unlimited number of members inside a structure
- All the above
Answer:- (D).
Explanations :none.
Explanations :none.
- char *
- struct
- void
- none of the mentioned
Answer:- (D).
Explanations :none.
Explanations :none.
- s1 = &s2;
- s1 = s2;
- (*s1).number = 10;
- None of the mentioned
Answer:- (D).
Explanations :none.
Explanations :none.
Copyright © 2022 Shineskill Software Pvt. Ltd., All rights reserved.