C - Structure and Union Questions and Answers

Practice Mode
Showing 10 of 51 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 in 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
C 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 struct
  • C struc
  • D structr
Answer: Option B
Q5
Structure declaration
  • A describes the prototype
  • B create structure variable
  • C defines the structure function
  • D is not necessary
Answer: Option A
Q6
Structure definition
  • A describes the prototype
  • B creates structure variable
  • C defines the structure function
  • D is not necessary
Answer: Option B
Q7
Identify the wrong syntax
  • A typedef struct (member declaration;}
  • B struct tag {member declaration; } V1, V2;
  • C typedef struct {member declaration;} NAME; NAME V1, V2;
  • D typedef struct tag {member declaration;} NAME; NAME V1, V2;
Answer: Option D
Q8
Identify the wrong syntax.
  • A struct tag {member declaration; };
  • B struct tag {member declaration; }V1, V2;
  • C struct tag {member declaration;}
  • D struct tag {member declaration;} V1, V2;
Answer: Option C
Q9
The operator used to access the structure member is
  • A *
  • B .
  • C []
  • D &
Answer: Option B
Q10
A structure
  • A can be read as a single entity
  • B cannot be read as a single entiry.
  • C can be displayed as a single entity
  • D has member variables that cannot be individually read.
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test