12 Data Structures (Computer Science) questions asked in BEL PE previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Match the language with its machine format.
Language: I. Unrestricted language; II. Context sensitive language; III. Context free language; IV. Regular expression
Machine: 1. Finite automata; 2. Push down automata; 3. Linear bounded automata; 4. Turing machine
AI – 3; II – 4; III – 1; IV – 2
BI – 2; II – 3; III – 4; IV – 1
CI – 4; II – 2; III – 1; IV – 3
DI – 4; II – 3; III – 2; IV – 1
Show answerHide answer
Correct answer: (D) I – 4; II – 3; III – 2; IV – 1
Consider the following queue of character, implemented using array of 7 memory,
Front = 3 Rear = 4 Queue: –, –, A, B, __, __, __, where '–' denotes empty memory cell. What is the value of front and rear after the following operation?
Enqueue C, D
Dequeue
Enqueue E, F
Dequeue
The following C function is an example of what type of recursion?
int f(int n)
{
if(n==1)
return 1;
else if(n==0)
return 0;
else
return(f(n-1)+f(n-2));
}
Consider 2 dimensional array A[10][15]. Assume that each element takes one memory location and base address of array A is 100. Consider the lower bound of row and column as 0. What is the address of A[i][j] if array A is stored in row major form?
Match the following algorithms with the data structure it uses.
Algorithm: I. Breadth first search; II. Heap sort; III. Depth first search
Data structure: 1. Stacks; 2. Queue; 3. Arrays
What is the minimum cost of the spanning tree of the given graph?
Vertices A to H with weighted edges: A–B 3, A–F 2, B–C 2, B–D 1, C–E 5, C–H 3, D–E 4, E–H 6, E–G 3, F–G 2, G–H 1.
A12
B14
C13
D11
Show answerHide answer
Correct answer: (B) 14
How to use these BEL PE Computer Science questions
Every question here was asked in a real BEL PE paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full BEL PE papers as timed tests to check your speed under exam conditions.