Top 350+ Solved Data Structure and Algorithms (DSA) MCQ Questions Answer
Q. A global variable is a variable
a. declared in the main ( ) function
b. declared in any function other than the main ( ) function
c. declared outside the body of every function.
d. declared any where in the c program.
Q. While incrementing a pointer, its value gets increased by the length of the data type to which it points. This length is called
a. scale factor
b. length factor
c. pointer factor
d. increment factor
Q. a->b is systematically correct if_____
a. a is a npointer to a structure in which b is a field
b. a and b are structure
c. a is a structure and b is a pointer to a structure
d. a is a pointer to a structure and b is a structure
Q. Which of the following best describes sorting ?
a. accessing and processing each record exactly once
b. finding the location of the record with a given key
c. arranging the data (record) in some given order
d. adding a new record to the data structure
Q. A function which calls itself is called as
a. library function
b. directive
c. recursive function
d. none of above
Q. Where do we use the operator -> ?
a. to access a member of structure
b. to access member of union
c. to access an array
d. both(a) and(b).
Q. In selection sort of n elements,how many times is the swap function called in the complete execution of the algorithm?
a. 1
b. n-1
c. n(n-1)/2
d. none of these
Q. a->b is systematically correct if_____
a. a is a pointer to a structure in which b is a field
b. a and b are structure
c. a is a structure and b is a pointer to a structure
d. a is a pointer to a structure and b is a structure
Q. Each data item in a record may be a groupitem composed of sub-items; those items which are indecomposable are called
a. Elementary items
b. Atoms
c. Scalars
d. All of above
Q. Which of the following statement is false ?
a. Arrays are dense lists and static data structure
b. Data elements in linked list need not be stored in adjacent space in memory
c. Pointers store the next data element of a list
d. Linked lists are collection of the nodes that contain information part and next pointer
Q. Binary search algorithm cannot be applied to
a. Sorted binary trees
b. Sorted linear array
c. Pointer array
d. Sorted linked list
Q. When new data are to be inserted into a data structure, but there is no available space; this situation is usually called
a. Housefull
b. Saturated
c. Underflow
d. Overflow