Data Structure - Programming Language (MCQ) questions

Dear Readers, Welcome to Data Structure multiple choice questions and answers with explanation. These objective type Data Structure questions are very important for campus placement test and job interviews.

Specially developed for the Data Structure freshers and professionals, these model questions are asked in the online technical test and interview of many IT companies.

1)   What is the ' next ' field of structure node in the Queue?
- Published on 19 Oct 15

a. Results into the storage of queue elements.
b. Results into the storage of address of next node by holding the next element of queue.
c. Results into the memory allocation of data elements to next node.
d. Results into the address allocation data elements to next node.
Answer  Explanation 

ANSWER: Results into the storage of address of next node by holding the next element of queue.

Explanation:
No explanation is available for this question!


2)   Which among the below mentioned assertions is / are mainly associated with the feature of Spooling?
- Published on 19 Oct 15

a. Scheduling of processes
b. Maintenance of a queue of jobs to be printed
c. A queue of client processes awaiting to gain the service from the service process
d. All of the above
Answer  Explanation 

ANSWER: Maintenance of a queue of jobs to be printed

Explanation:
No explanation is available for this question!


3)   Where is the root directory of a disk placed?
- Published on 19 Oct 15

a. Anywhere on the disk.
b. At a fixed location on the system disk.
c. At a fixed address in main memory.
d. None of the above.
Answer  Explanation 

ANSWER: At a fixed location on the system disk.

Explanation:
No explanation is available for this question!


4)   From where does the insertion and deletion of elements get accomplished in Queues?
- Published on 19 Oct 15

a. Front & Rear ends respectively
b. Rear & Front ends respectively
c. Only Front ends
d. Only Rear ends
Answer  Explanation 

ANSWER: Rear & Front ends respectively

Explanation:
No explanation is available for this question!


5)   Which among the below mentioned entities is / are essential for an Array Representation of a Queue?
- Published on 19 Oct 15

a. An array to hold queue elements
b. A variable to hold the index of front element
c. A variable to hold the index of rear element
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


6)   Which value is assigned/set at front and rear ends during the Initialization of a Queue?
- Published on 19 Oct 15

a. 0
b. 1
c. - 1
d. infinity
Answer  Explanation 

ANSWER: - 1

Explanation:
No explanation is available for this question!


7)   What should be the value of rear (end) if the queue is full (elements are completely occupied )?
- Published on 19 Oct 15

a. 1
b. - 1
c. MAX + 1
d. MAX - 1
e. zero (null)
Answer  Explanation 

ANSWER: MAX - 1

Explanation:
No explanation is available for this question!


8)   Which among the below specified condition is applicable if the Queue is non - empty?
- Published on 19 Oct 15

a. rear > front
b. rear < front
c. rear = front
d. Unpredictable
Answer  Explanation 

ANSWER: rear > front

Explanation:
No explanation is available for this question!


9)   Where the elements are stored in accordance to the representation of Queue by a Linked Structure?
- Published on 19 Oct 15

a. mesh
b. node
c. both a & b
d. none of the above
Answer  Explanation 

ANSWER: node

Explanation:
No explanation is available for this question!


10)   Which of the following ' C ' functions is precise to verify the emptiness of a Queue?
- Published on 19 Oct 15

a.
int empty(Q*P)
{
if (P->R==-1)
return (1);
return(0);
}
b.
int full (Q*P)
{
if(P->R==MAX-1)
return(1);
return(0);
}
c.
int empty (Q*P)
{
if (P<-R==-1)
return(0);
return(1);
}
d.
int full (Q*P)
{
if(P<-R==MAX-1)
return(0);
return(1);
}
Answer  Explanation 

ANSWER:
int empty(Q*P)
{
if (P->R==-1)
return (1);
return(0);
}

Explanation:
No explanation is available for this question!


1 2 3 4 5 6 7 8 9 10 ...