Cct308 Scheme
Cct308 Scheme
Instructions: (1) Each question carries one mark. No negative marks for wrong answers
(2) Total number of questions: 50
(3) All questions are to be answered. Each question will be followed by 4 possible answers of
which only ONE is correct.
(4) If more than one option is chosen, it will not be considered for valuation.
(5) Calculators are not permitted
3. The best data structure to check whether an arithmetic expression has balanced parentheses is a
a) Queue b) Stack c) Tree d) Graph
4. When a pop() operation is called on an empty queue, what is the condition called?
a) Overflow b) Underflow c) Syntax error d) Garbage
5. The time complexity of heap sort in worst case is:
a) O(logn) b) O(n) c) O(nlogn) d) O(n2 )
6. What does the following function do for a given Linked List with the first node as head?
void fun1(struct node* head) {
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}
Page 1 of 6
0800CCT308042502
7. In a file which contains 1 million records and the order of the tree is 100, then what is the
maximum number of nodes to be accessed if B+ tree index is used?
a) 4 b) 3 c) 5 d) 6
8. In a graph, if every vertex is connected to every other vertex, the graph is known as:
a) sparse graph b) tree c) complete graph d) null graph
9. To implement a stack using queue (with only enqueue and dequeue operations), how many
queues will you need?
a) 1 b) 2 c) 3 d) 4
10. Which of the following c code is used to create a new node?
a) ptr = b) ptr = c) ptr = d) ptr =
(NODE*)mallo (NODE*)malloc(N (NODE*)malloc( (NODE)ma
c(sizeof(NODE ODE); sizeof(NODE*)); lloc(sizeof(
)); NODE));
12 If a process is executing in its critical section, then no other processes can be executing in their
critical section. What is this condition called?
a) mutual b) critical exclusion c) synchronous d) asynchrono
exclusion exclusion us
exclusion
13 In a time sharing operating system, when the time slot assigned to a process is completed, the
process switches from the current state to?
a) Suspended state b) Terminated state c) Ready state d) Blocked
state
15 Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at
times 0, 2 and 6 respectively. How many context switches are needed if the operating system
Page 2 of 6
0800CCT308042502
implements a shortest remaining time first scheduling algorithm? Do not count the context
switches at time zero and at the end.
a) 1 b) 2 c) 3 d) 4
16 A system has 3 user processes each requesting 2 units of resource ‘R’. The minimum number
of units of R needed such that no deadlock will occur?
a) 3 b) 4 c) 5 d) 6
17 Which of the following are NOT shared by the threads of the same process?
a) Stack b) Registers c) Address space d) Message queue
a) a and d b) b and c c) a and b d) a, b and c
Page 3 of 6
0800CCT308042502
Page 4 of 6
0800CCT308042502
Page 5 of 6
0800CCT308042502
49 All the below-stated processes are performed in the AES (Advanced Encryption Standard)
Algorithm. Which of the following process(s) are not performed in the final round of the AES?
a) b) c) d)
Substitution Shift rows Mix columns Add round
bytes key
Page 6 of 6