Structure in C Exercise I


Ques 1 Structure


Can we pass the structure within a function ?
  a) Yes
  b) No
  c) N/A
  d) N/A


a is the correct option




Ques 2 Structure


Which of the following is the correct syntax of passing structure variable in function?
  a) void sc(struct vari)
  b) void sc(struct *vari[])
  c) void sc(struct *vari)
  d) All of the above


c is the correct option




Ques 3 Structure


What is the difference between union and structure?
  a) All members are used at a time in Union
  b) Union initialized all members same as structure
  c) Union cannot have more members
  d) Only one member can be used at a time in Union


d is the correct option




Ques 4 Structure


What is the size of structure variable "student"?

struct student{
    char name[12];
    int roll[6];
    float percentage;
}

  a) 12
  b) 18
  c) 26
  d) 28


d is the correct option