NEW
Font size
WorksheetsQuiz
Total questions: 40
Worksheet time: 20mins
Which of the following is a mutable data type in Python?
tuple
list
String
Frozenset
What is the output of print(2**3) in Python?
8
6
9
5
Which keyword is used to define a function in Python?
fun
def
define
function
What is the default return type of a function that does not return any value in Python?
None
Null
0
false
Which of the following is used to handle exceptions in Python?
error-handling
do-catch
try-except
handle-except
Which of the following is not a valid C keyword?
auto
register
define
loop
Which header file is required for printf and scanf in C?
stdio.h
conio.h
string.h
stdlib.h
What is the size of int in most C compilers (32-bit system)?
2 bytes
4 bytes
16 bytes
8 bytes
Which operator is used for 'address of' in C?
&
*
%
#
What will sizeof(char) return in C?
1
0
2
depend on compiler
What is the time complexity of accessing an element in an array by index?
O(n)
O(1)
O(log n )
O( n log n )
Which of the following is correct about arrays in C?
Index starts from 1
Size must be declared at run-time
array elements are stored in stord in contiguous memory
array name represents last element address
Which data structure is best suited for implementing a fixed-size collection of homogeneous elements?
Array
Stack
Queue
Linked List
What will happen if you access an out-of-bound index in C array?
Program will terminate immediately
Compile time error
Index wraps around
Undefined behavior
Which of the following operations is not possible directly on arrays?
Traversal
Insertion at the end
Dynamic resizing
Deletion
Which of the following is not an application of stack?
Expression evaluation
Function call management
undo feature in editors
CPU scheduling
Which operation inserts an element in a stack?
push
pop
insert
append
What is the time complexity of push and pop operations in stack?
O(n)
O(1)
O(log n )
O(n log n )
Stack works on which principle?
FIFO
LIFO
FILO
Both LIFO and FILO
Infix to postfix conversion uses which data structure?
Queue
Stack
Array
Linked List
Which of the following is not a type of queue?
Circular Queue
Priority Queue
Heap Queue
Deque
Queue follows which principle?
FIFO
LIFO
FILO
NONE
Which operation removes an element from a queue?
pop
dequeue
Delete
Remove
What is the main drawback of linear queue implementation using arrays?
Slow insertion
Slow deletion
Waste of memory
Complexity of operations
Double-ended queue allows insertion and deletion at:
Both ends
Middle only
Front only
Rear only
What is the advantage of implementing stack using linked list?
Faster access time
Dynamic memory usage
Fixed memory usage
None
Which is true about queue implementation using linked list?
Insertion at rear, deletion at front
Insertion at front, deletion at rear
Both insertion & deletion at Rear
Both insertion & deletion at Front
In linked list implementation of stack, which pointer is required?
Top
Head
Rear
Both Head and Top
In linked list implementation of queue, which pointers are required?
Both front and rear
Only head
Only Front
Only rear
Which of the following is true about sparse matrix?
Most of the elements are non-zero
Most of the elements are zero
It is a type of stack
It cannot be represented efficiently
Which of the following is not a valid HTML tag?
<p>
<br>
<span>
<break>
Which HTML attribute is used to define inline CSS?
style
class
css
design
Which tag is used to create a hyperlink in HTML?
<link>
<a>
<href>
<url>
Which of the following is not a valid CSS property?
color
font-size
text-align
text-weight
In JavaScript, which keyword is used to declare a variable?
var
let
const
All
Which method is used in JavaScript to print content on the console?
print()
console.log()
log.print()
write()
Which of the following is used for server-side programming?
JavaScript (Node.js)
XML
HTML
CSS
Which HTTP method is idempotent?
GET
POST
DELETE
PATCH
Which protocol is used to transfer web pages from server to client?
TCP
FTP
SMTP
HTTP
Which of the following is a backend framework?
Django
Bootstrap
React
Angular
