C Programming-Structure and Union Questions and Answers

Practice Mode
Showing 10 of 29 questions
Q1
Structure is a
  • A scalar data type
  • B derived data type
  • C both options a and b
  • D Primitive data type
Answer: Option B
Q2
Structure is a data type is which
  • A each element must have the same data type.
  • B each element must have pointer type only
  • C each element may have different data type
  • D no element is defined
Answer: Option C
Q3
provides a facility for user defined data type using
  • A pointer
  • B function
  • C structure
  • D array
Answer: Option C
Q4
The keyword used to represent a structure data type is
  • A structure
  • B struc
  • C struct
  • D structr
Answer: Option B
Q5
Structure declaration
  • A describes the prototype
  • B creates structure variable
  • C defines the structure function
  • D is not necessary
Answer: Option A
Q6
In a structure defination
  • A initialization of structure members are possible
  • B initialization of array of structures are possible
  • C both options a and b
  • D initialization of array of structures are not possible
Answer: Option C
Q7
If one or more members of a structure are pointer to the same structure the structure is known as
  • A nested structure
  • B invalid structure
  • C self-referential structure
  • D structured structure
Answer: Option C
Q8
If one or more members of a structure are other structures, the structure is known as
  • A nested structure
  • B invalid structure
  • C self-referential structure
  • D unstructured structure
Answer: Option A
Q9
What type of structure is created by the following definition ? struct first {.....struct second *s;}; struct second {.....;struct first *f ;};
  • A Nested structure
  • B Self-referential structure
  • C Invalid structure
  • D Structured strcture
Answer: Option B
Q10
The changes made in the members of structure are not available in the calling function if
  • A pointer to structure is passed as argument
  • B the members other than pointer type are passed as arguments
  • C Structure variable is passed as argument
  • D both options b and c
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test