Top 350+ Solved Data Structure and Algorithms (DSA) MCQ Questions Answer
Q. Two main measures for the efficiency of an algorithm are
a. processor and memory
b. complexity and capacity
c. time and space
d. data and space
Q. Computers are used for processing numerical data called _______ data.
a. float
b. local
c. character
d. non-local
Q. Each programming language contains a ______ set that is used to communicate with the computer.
a. character
b. integer
c. float
d. numeric
Q. Finite sequence S of zero or more characters is called _______.
a. array
b. list
c. string
d. block
Q. A computer which can access an individual byte is called a ________ machine.
a. memory addressable
b. byte addressable
c. bit
d. byte
Q. Groups of consecutive elements in a string, such as words, phrases and sentences are called ________.
a. main strings
b. substring
c. index
d. block
Q. _________ operation of word processing involves replacing one string in the text by another.
a. insertion
b. deletion
c. searching
d. replacement
Q. ________ is the problem of deciding whether or not a given String pattern P appears in a text T.
a. pattern matching
b. searching
c. sorting
d. deletion
Q. Select the set of instructions to insert a node pointed by q after a node pointed by p
a. q->next=p->next; p->next=q;
b. p->next=q; q->next=p->next
c. both (a)and(b)
d. none of these
Q. select the set of operations to insert a node pointed by q at the beginning of the linked list
a. q->next=head; head=q;
b. head=q;q ->next=head;
c. both (a)and(b)
d. none of these
Q. Select the set of operations to delete the first node from a linked list
a. p=head;head=head->next;free(p);
b. free(head)
c. head=head->next;p=head;free(p)
d. none of these
Q. Select the correct looping condition for positioning apointer p on the second last in a linked list.Assume p=head,initially.
a. p->next->next!=null
b. p->next=null
c. p!=null
d. none of these
Q. If address of the 8th element in a linked list of integers is1022,then address of the 9th element is
a. 1024
b. 1026
c. 1023
d. unknown