C Structure MCQ


Q1. What will be the size of the following structure? ,br>
#include 
struct temp {
  int a[10];
  char p;
};
  1. 5
  2. 11
  3. 41
  4. 44

Answer:- (D).
Explanations :none.
Q2.Who is father of C Language?
  1. A structure is a collection of elements that can be of same datatype
  2. A structure is a collection of elements that can be of different datatype
  3. Elements of a structure are called members
  4. All of the these

Answer:- (D).
Explanations :none.
Q3. What is the size of a C structure?
  1. C structure is always 128 bytes
  2. Size of C structure is the totatl bytes of all elements of structure
  3. Size of C structure is the size of largest elements
  4. 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.
Q4. Choose a correct statement about C structure?
int main() {
struct ship {

};
return 0;
}
  1. It is wrong to define an empty structure
  2. Member variables can be added to a structure even after its first definition
  3. There is no use of defining an empty structure
  4. None of the above

Answer:- (B).
Explanations :none.
Q5. Choose a correct statement about C structure elements?
  1. Structure elements are stored on random free memory locations
  2. structure elements are stored in register memory locations
  3. structure elements are stored in contiguous memory locations
  4. None of the above

Answer:- (C).
Explanations :none.
Q6. A C structure or User defined datatype is also called ________.
  1. Derived data type
  2. Secondary data type
  3. Aggregate data type
  4. All the above

Answer:- (D).
Explanations :none.
Q7. What are the uses of C Structures?
  1. structure is used to implement Linked Lists, Stack and Queue data structures
  2. Structures are used in Operating System functionality like Display and Input taking
  3. Structure are used to exchange information with peripherals of PC
  4. All the above

Answer:- (D).
Explanations :none.
Q8. Choose a correct statement about C structures.
  1. A structure can contain same structure type member
  2. A structure size is limited by only physical memory of that PC
  3. You can define an unlimited number of members inside a structure
  4. All the above

Answer:- (D).
Explanations :none.
Q9. Which of the following return-type cannot be used for a function in C?
  1. char *
  2. struct
  3. void
  4. none of the mentioned

Answer:- (D).
Explanations :none.
Q10. Which of the following is not possible under any scenario?
  1. s1 = &s2;
  2. s1 = s2;
  3. (*s1).number = 10;
  4. None of the mentioned

Answer:- (D).
Explanations :none.