WorksheetsSKILL UP1 QUIZ1 17/12/2025
Total questions: 40
Worksheet time: 22mins
Which of the following is not the type of queue?
Priority queue
Single-ended queue
Circular queue
Ordinary queue
What will the output of the following code snippet?
void solve() {
int a[] = {1, 2, 3, 4, 5};
int sum = 0;
for(int i = 0; i < 5; i++) {
if(i % 2 == 0) {
sum += *(a + i);
}
else {
sum -= *(a + i);
}
}
cout << sum << endl;
}
15
syntax error
3
2
The depth of a complete binary tree is given by
Dn = log2n+1
Dn = n log2n+1
Dn = n log2n
Dn = log2n
The operation of processing each element in the list is known as
Inserting
Traversal
Merging
Sorting
The complexity of Bubble sort algorithm is
O(n2)
O(n)
O(log n)
O(n log n)
The complexity of Binary search algorithm is
O(n)
O(n log n)
O(n2)
O(log n)
Which of the following data structure is linear type?
Binary Tree
Stack
Graph
Trees
Any node is the path from the root to the node is called
Ancestor node
Internal node
Successor node
None of the above
A graph is a tree if and only if graph is
Directed graph
Contains no cycles
Planar
Completely connected
A graph in which all vertices have equal degree is known as __
Simple graph
Multi graph
Regular graph
Complete graph
If two trees have same structure and node content, then they are
called __
Equivalent trees
Synonyms trees
Similar trees
Joint trees
Finding the location of a given item in a collection of items is called ……
Discovering
Mining
Finding
Searching
Linked list are not suitable data structure of which one of the following problems ?
Insertion sort
Binary search
Polynomial manipulation
Radix sort
Stack Data operations are
Push
Pop
Traverse
Display
In a stack, if a user tries to remove an element from empty stack it is called _________
Underflow
Stack is Empty
Overflow
None of the above
Pushing an element into stack already having five elements and stack size of 5, then stack becomes
Overflow
Crash
Underflow
None of the above
Entries in a stack are “ordered”. What is the meaning of this statement?
A collection of stacks is sortable
Stack entries may be compared with the ‘<‘ operation
The entries are stored in a linked list
There is a Sequential entry that is one by one
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(())) are:
1
2
3
4
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 right parentheses (in some order).
The maximum number of parentheses that appear on the stack AT ANY ONE TIME during the computation?
6
3
4
2
In preorder traversal of a binary tree the second step is ____________
traverse the right subtree
traverse the left subtree
traverse right subtree and visit the root
visit the root
What is the result of 5 & 3 in binary?
2
1
4
0
What is the result of 10 ^ 6 in binary?
1010
1100
1001
1110
Fill in the blank: Bitwise AND operator returns 1 only if ________ bits are 1.
both
none
neither
either
There are ___ storage classes in C
2
4
6
8
The data type int uses ___ bytes of memory.
2
4
6
8
Which is the incorrect form of variable?
sale20
Name
12Rno
Net_Salary
What is the default C Storage Class for a variable?
static
auto
register
extern
To find reminder _____ operator is use in C program
%
@
/
|
C program is save with _____ extension.
.a
.b
.c
.d
Switch statement checks only _____ condition.
Equality
Not equal to
Less than
Greater than
Which of the following is not a condition for deadlock?
Mutual exclusion
Hold and wait
Preemption
Circular wait
The grouping of jobs that require similar resources
timesharing
serial processing
multiprogramming
batch processing
The ability for a computer to execute more than one task simultaneously
multitasking
multiprogramming
multiprocessing
timesharing
The operating system is a type of
system software
general purpose software
utility software
application software
Which is not in the PCB
Process state
resources needed
program counter
processor size
Which is not a process state?
waiting
terminated
blocked
redirected
Preemption means
process can be paused by system
process cannot be halted once execution begins
process has high priority
process is short
FCFS is operates similar to a
stack
sorting algorithm
circle
queue
SJF is short for
Shortest Job First
Software Job First
System Job First
Shortest Job Final
