Loading...

C Multiple Choice Questions

Our C questions and answers focuses on all areas of C programming language covering 100+ topics in C

C Structures-1 MCQs

C Structures-1


1. What will be the size of the following structure?
#include <stdio.h>
struct temp {
  int a[10];
  char p;
};

a) 5
b) 11
c) 41
d) 44



2. What is a structure in C language?

a) A structure is a collection of elements that can be of same datatype
b) A structure is a collection of elements that can be of different datatype
c) Elements of a structure are called members
d) All of the these



3. What is the size of a C structure?

a) C structure is always 128 bytes
b) Size of C structure is the totatl bytes of all elements of structure
c) Size of C structure is the size of largest elements
d) None of the above



4. Choose a correct statement about C structure?
int main() {
struct ship {

};
return 0;
}

a) It is wrong to define an empty structure
b) Member variables can be added to a structure even after its first definition
c) There is no use of defining an empty structure
d) None of the above



5. Choose a correct statement about C structure elements?

a) Structure elements are stored on random free memory locations
b) structure elements are stored in register memory locations
c) structure elements are stored in contiguous memory locations
d) None of the above



6. A C structure or User defined datatype is also called ________.

a) Derived data type
b) Secondary data type
c) Aggregate data type
d) All the above



7. What are the uses of C Structures?

a) structure is used to implement Linked Lists, Stack and Queue data structures
B) Structures are used in Operating System functionality like Display and Input taking
C) Structure are used to exchange information with peripherals of PC
D) All the above



8. Choose a correct statement about C structures.

a) A structure can contain same structure type member
b) A structure size is limited by only physical memory of that PC
c) You can define an unlimited number of members inside a structure
d) All the above



9. Which of the following return-type cannot be used for a function in C?

a) char *
b) struct
c) void
d) none of the mentioned



10. Which of the following is not possible under any scenario?

a) s1 = &s2;
b) s1 = s2;
c) (*s1).number = 10;
d) None of the mentioned



- Related Topics