Explore topic-wise MCQs in Data Structure Questions and Answers.

This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structure Questions and Answers knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following array element will return the top-of-the-stack-element for a stack of size N elements(capacity of stack > N)?

A. S[N-1]
B. S[N]
C. S[N-2]
D. S[N+1]
Answer» B. S[N]
2.

What is the functionality of the following piece of Java code?

A. Assume: ‘a’ is a non empty array of integers, the Stack class creates an array of specified size and provides a top pointer indicating TOS(top of stack), push and pop have normal meaning.
Answer» E.