WorksheetsGeek-o-mania
Total questions: 200
Worksheet time: 33mins
Name
Class
Date
1.
Which of these is NOT a programming language?
a)
Python
b)
Java
c)
HTML
d)
C++
2.
What does CPU stand for?
a)
Central Processing Unit
b)
Control Program Utility
c)
Central Print Unit
d)
Computer Processing Utility
3.
In Python, what is the output of print(2 + 3 * 2)?
a)
10
b)
8
c)
12
d)
7
4.
Which symbol is used to comment in Python?
a)
//
b)
#
c)
/* */
d)
--
5.
In C, which header file is needed for printf?
a)
conio.h
b)
stdlib.h
c)
stdio.h
d)
string.h
6.
Java was developed by which company?
a)
Sun Microsystems
b)
Microsoft
c)
Google
d)
Apple
7.
Which loop executes at least once?
a)
for
b)
while
c)
do-while
d)
none
8.
What is the time complexity of binary search?
a)
O(n)
b)
O(log n)
c)
O(n log n)
d)
O(1)
9.
Which of these is NOT an OOP concept?
a)
Encapsulation
b)
Inheritance
c)
Compilation
d)
Polymorphism
10.
In Python, what does len("AI") return?
a)
1
b)
2
c)
3
d)
Error
11.
Which keyword creates an object in Java?
a)
make
b)
new
c)
create
d)
object
12.
Which data structure works on FIFO?
a)
Stack
b)
Queue
c)
Tree
d)
Graph
13.
Who is the creator of C language?
a)
Dennis Ritchie
b)
James Gosling
c)
Bjarne Stroustrup
d)
Guido van Rossum
14.
Which algorithm is best for finding shortest path?
a)
Quick Sort
b)
Dijkstra’s
c)
Merge Sort
d)
BFS
15.
Which of these is NOT a database?
a)
MySQL
b)
MongoDB
c)
Oracle
d)
Linux
16.
In Python, what is type([])?
a)
dict
b)
list
c)
tuple
d)
set
17.
Which keyword is used to inherit a class in C++?
a)
extends
b)
implements
c)
inherits
d)
:
18.
Which sorting algorithm is fastest on average?
a)
Bubble
b)
Quick Sort
c)
Selection
d)
Insertion
19.
Which symbol is used for pointer in C?
a)
@
b)
*
c)
#
d)
&
20.
Python was created in which year?
a)
1991
b)
1989
c)
2000
d)
1995
21.
Which company owns GitHub?
a)
Google
b)
Microsoft
c)
Apple
d)
Amazon
22.
In Java, which method starts program execution?
a)
init()
b)
main()
c)
start()
d)
run()
23.
Which data structure is used in DFS?
a)
Queue
b)
Stack
c)
Array
d)
Linked list
24.
In Python, what is 3 ** 2?
a)
6
b)
9
c)
8
d)
Error
25.
Which protocol is used for web browsing?
a)
FTP
b)
HTTP
c)
SMTP
d)
SSH
26.
Which company developed Java?
a)
Microsoft
b)
Sun Microsystems
c)
Google
d)
IBM
27.
In Python, what does len("OpenAI") return?
a)
4
b)
5
c)
6
d)
7
28.
Which data structure uses LIFO principle?
a)
Queue
b)
Stack
c)
Graph
d)
Array
29.
What does “git” stand for?
a)
General Internet Tool
b)
Global Information Tracker
c)
Graphical Interface Terminal
d)
None
30.
Size of int in 64-bit C compilers?
a)
2 bytes
b)
4 bytes
c)
8 bytes
d)
Depends
31.
In C++, what is cout used for?
a)
Input
b)
Output
c)
Classes
d)
Looping
32.
Default value of boolean in Java?
a)
0
b)
1
c)
True
33.
Which language was created at Bell Labs?
a)
C
b)
Java
c)
Python
d)
Swift
34.
Python function keyword?
a)
def
b)
function
c)
fun
d)
define
35.
What does break do?
a)
Ends program
b)
Exits loop
c)
Skips iteration
d)
Restarts loop
36.
Which is not a loop?
a)
for
b)
while
c)
repeat
d)
switch
37.
In Java, == checks?
a)
Value
b)
Reference
c)
Deep equality
d)
None
38.
Output of print(10 // 3)?
a)
3.3
b)
3
c)
4
d)
Error
39.
Best structure for recursion?
a)
Queue
b)
Stack
c)
Array
d)
Graph
40.
Who created C++?
a)
James Gosling
b)
Bjarne Stroustrup
c)
Dennis Ritchie
d)
Tim Berners-Lee
41.
NOT a Java primitive type?
a)
int
b)
string
c)
double
d)
char
42.
Main advantage of linked list?
a)
Fast indexing
b)
Dynamic size
c)
Less memory
d)
Easy sort
43.
Simplest sorting algorithm?
a)
Merge
b)
Quick
c)
Bubble
d)
Heap
44.
Python exception keyword?
a)
throw
b)
catch
c)
except
d)
error
45.
JVM stands for?
a)
Java Virtual Machine
b)
Java Version Manager
c)
Just Virtual Memory
d)
Java Variable Manager
46.
Which is dynamically typed?
a)
C
b)
Java
c)
Python
d)
C++
47.
Extension of Python file?
a)
.java
b)
.py
c)
.cpp
d)
.txt
48.
1 GB = ?
a)
1000 MB
b)
1024 MB
c)
1024 KB
d)
1000 KB
49.
NOT comparison-based sort?
a)
Merge
b)
Quick
c)
Counting
d)
Heap
50.
None in Python means?
a)
Zero
b)
False
c)
Null
d)
Empty string
51.
Which company developed C#?
a)
Sun Microsystems
b)
Google
c)
Microsoft
d)
Apple
52.
In C, char usually takes how many bytes?
a)
1
b)
2
c)
4
d)
Depends
53.
In Python, what does [] == [] return?
a)
True
b)
False
c)
Error
d)
None
54.
Which algorithm is called "divide and conquer"?
a)
Bubble Sort
b)
Quick Sort
c)
Linear Search
d)
Stack
55.
What is the extension of a Java bytecode file?
a)
.java
b)
.class
c)
.jar
d)
.exe
56.
Who invented Python?
a)
Bjarne Stroustrup
b)
James Gosling
c)
Guido van Rossum
d)
Dennis Ritchie
57.
Which searching algorithm checks element one by one?
a)
Linear Search
b)
Binary Search
c)
DFS
d)
BFS
58.
In Java, which collection allows duplicates?
a)
Set
b)
List
c)
Map
d)
None
59.
In C++, which operator is overloaded by default?
a)
+
b)
=
c)
[]
d)
()
60.
What is the default value of int in Python?
a)
False
b)
None
c)
Error
d)
Undefined
61.
Which algorithm is used by Google Maps for shortest path?
a)
Bubble Sort
b)
Dijkstra
c)
Merge Sort
d)
DFS
62.
Which operator is used for reference in C++?
a)
&
b)
*
c)
@
d)
$
63.
In Python, what is output of print("a" * 3)?
a)
aaa
b)
3a
c)
Error
d)
a3
64.
Which keyword is used to stop recursion in Python?
a)
exit
b)
break
c)
return
d)
stop
65.
Which Java keyword prevents inheritance?
a)
super
b)
static
c)
final
d)
private
66.
Output of print(5 % 2)?
a)
1
b)
2
c)
Error
67.
Which data structure is used in BFS?
a)
Stack
b)
Queue
c)
Tree
d)
Graph
68.
Which C function is used to read input?
a)
printf
b)
scanf
c)
gets
d)
read
69.
What is the worst case of Quick Sort?
a)
O(n)
b)
O(n log n)
c)
O(n^2)
d)
O(log n)
70.
Which keyword is used in Java for multiple inheritance (via interfaces)?
a)
extend
b)
inherit
c)
implement
d)
super
71.
In Python, which keyword defines a function?
a)
func
b)
define
c)
def
d)
function
72.
Which memory is fastest?
a)
RAM
b)
Cache
c)
Hard disk
d)
SSD
73.
In C, which loop is entry-controlled?
a)
do-while
b)
while
c)
for
d)
Both B & C
74.
Output of print(2 == 2.0) in Python?
a)
True
b)
False
c)
Error
d)
None
75.
In Java, which package is auto-imported?
a)
java.util
b)
java.io
c)
java.lang
d)
java.sql
76.
Time complexity of Merge Sort?
a)
O(n)
b)
O(log n)
c)
O(n log n)
d)
O(n^2)
77.
Which of these is NOT Python data type?
a)
list
b)
tuple
c)
array
d)
set
78.
In C, which function allocates memory?
a)
malloc
b)
printf
c)
scanf
d)
input
79.
What is the default access modifier in Java?
a)
public
b)
private
c)
protected
d)
package-private
80.
In Python, bool("") returns?
a)
True
b)
False
c)
None
d)
Error
81.
Which scheduling algorithm is “first come, first served”?
a)
FCFS
b)
Round Robin
c)
Priority
d)
SJF
82.
Which Java keyword is used for exceptions?
a)
error
b)
catch
c)
except
d)
throw
83.
Output of print(10 < 20 and 20 < 10)?
a)
True
b)
False
c)
Error
d)
None
84.
Which data structure is used in function calls?
a)
Queue
b)
Stack
c)
Heap
d)
Tree
85.
Who invented World Wide Web?
a)
Tim Berners-Lee
b)
Bill Gates
c)
Elon Musk
d)
Steve Jobs
86.
Which operator is used in Python for exponent?
a)
^
b)
**
c)
*
d)
pow
87.
In C++, which keyword creates object?
a)
new
b)
malloc
c)
make
d)
create
88.
Which is NOT a stable sorting algorithm?
a)
Merge
b)
Bubble
c)
Quick
d)
Insertion
89.
Output of print(7 // 2) in Python?
a)
3.5
b)
4
c)
3
d)
Error
90.
Which OS is open-source?
a)
Windows
b)
Linux
c)
macOS
d)
iOS
91.
Which searching algorithm needs sorted data?
a)
Linear
b)
Binary
c)
Hashing
d)
BFS
92.
In Java, what is System.out.println() used for?
a)
Input
b)
Output
c)
Storage
d)
Error
93.
Time complexity of Bubble Sort?
a)
O(n)
b)
O(n log n)
c)
O(n^2)
d)
O(log n)
94.
In Python, set([1,1,2]) gives?
a)
{1,2}
b)
[1,2]
c)
{1,1,2}
d)
Error
95.
In C, which symbol is used for address-of?
a)
*
b)
&
c)
#
d)
%
96.
Which is NOT an OS?
a)
Linux
b)
Windows
c)
Oracle
d)
macOS
97.
Which keyword in Java is used for inheritance?
a)
super
b)
extends
c)
implements
d)
base
98.
Output of print(type("123")) in Python?
a)
int
b)
str
c)
float
d)
Error
99.
In algorithms, Big-O describes?
a)
Output
b)
Memory
c)
Time complexity
d)
Compiler
100.
Which was the first high-level programming language?
a)
C
b)
Java
c)
FORTRAN
d)
Python
101.
Which of these is NOT a programming language?
a)
Python
b)
HTML
c)
Java
d)
C++
102.
In C, printf("%d", 5/2); prints?
a)
2.5
b)
2
c)
3
d)
Error
103.
In Python, len("hello") returns?
a)
4
b)
5
c)
6
d)
Error
104.
Who invented C++?
a)
Bjarne Stroustrup
b)
James Gosling
c)
Dennis Ritchie
d)
Ken Thompson
105.
Which Java collection stores key-value pairs?
a)
List
b)
Set
c)
Map
d)
Array
106.
In recursion, what is essential to avoid infinite calls?
a)
Base case
b)
Loop
c)
Return type
d)
Static
107.
What is the file extension of C++ source code?
a)
.c
b)
.cpp
c)
.java
d)
.py
108.
In Python, 3 == 3.0 returns?
a)
True
b)
False
c)
Error
d)
None
109.
Which sorting algorithm is also called "partition-exchange sort"?
a)
Merge
b)
Quick
c)
Insertion
d)
Bubble
110.
Which symbol is used for comments in Python?
a)
//
b)
#
c)
/* */
d)
%
111.
Which keyword is used to declare a constant in Java?
a)
final
b)
const
c)
static
d)
constant
112.
Which data structure uses LIFO?
a)
Queue
b)
Stack
c)
Tree
d)
Graph
113.
Output of print("python"[::-1])?
a)
nohtyp
b)
python
c)
error
d)
notyp
114.
In C, what is size of int (commonly)?
a)
1
b)
2
c)
4
d)
8
115.
Which sorting algorithm is best for nearly sorted data?
a)
Bubble
b)
Merge
c)
Insertion
d)
Quick
116.
Who invented Java?
a)
James Gosling
b)
Dennis Ritchie
c)
Guido van Rossum
d)
Linus Torvalds
117.
In Python, which function gives ASCII of a character?
a)
chr()
b)
ord()
c)
ascii()
d)
code()
118.
Which C keyword is used to exit a loop?
a)
stop
b)
exit
c)
break
d)
end
119.
What is the default value of boolean in Java?
a)
True
b)
False
c)
null
d)
undefined
120.
Which searching algorithm is recursive in nature?
a)
Linear
b)
Binary
c)
Hash
d)
BFS
121.
Output of print(5 != 5) in Python?
a)
True
b)
False
c)
Error
d)
None
122.
In OS, which is faster?
a)
Secondary memory
b)
Cache
c)
Hard disk
d)
SSD
123.
Which Java loop always executes at least once?
a)
while
b)
do-while
c)
for
d)
none
124.
In C++, which operator is used for pointer dereference?
a)
&
b)
*
c)
->
d)
%
125.
Which algorithm is used for minimum spanning tree?
a)
Quick Sort
b)
Dijkstra
c)
Kruskal
d)
DFS
126.
In Python, type([]) returns?
a)
tuple
b)
list
c)
dict
d)
set
127.
Which company created Java?
a)
Google
b)
Microsoft
c)
Sun Microsystems
d)
IBM
128.
Output of print(2 ** 4)?
a)
6
b)
8
c)
16
d)
24
129.
Which OS kernel is used in Android?
a)
Windows
b)
Linux
c)
macOS
d)
Unix
130.
Which is NOT a valid identifier in Python?
a)
abc
b)
_var
c)
2data
d)
myVar
131.
In C, which loop executes zero or more times?
a)
do-while
b)
while
c)
for
d)
both B & C
132.
Output of print(10 // 3)?
a)
3.3
b)
3
c)
4
d)
Error
133.
Which of these is NOT OOP concept?
a)
Inheritance
b)
Encapsulation
c)
Compilation
d)
Polymorphism
134.
Which sorting algorithm is based on "heap"?
a)
Merge
b)
Heap Sort
c)
Quick
d)
Radix
135.
In Java, what is the parent class of all classes?
a)
String
b)
Object
c)
Class
d)
Super
136.
Which Python keyword handles exceptions?
a)
error
b)
catch
c)
except
d)
throw
137.
In C, which operator accesses structure members via pointer?
a)
.
b)
->
c)
*
d)
&
138.
Which traversal prints tree nodes level by level?
a)
Inorder
b)
Preorder
c)
Postorder
d)
Level-order
139.
Output of print(len(set("banana")))?
a)
6
b)
3
c)
2
d)
1
140.
In C++, cin is used for?
a)
Input
b)
Output
c)
Error
d)
None
141.
Which OS is used in Apple devices?
a)
Linux
b)
iOS
c)
Windows
d)
Android
142.
Which algorithm is NOT comparison-based?
a)
Merge Sort
b)
Radix Sort
c)
Quick Sort
d)
Bubble Sort
143.
In Python, print(bool(" ")) gives?
a)
True
b)
False
c)
Error
d)
None
144.
Which Java keyword allocates memory?
a)
malloc
b)
allocate
c)
new
d)
create
145.
Which data structure is used in undo feature?
a)
Queue
b)
Stack
c)
Heap
d)
Graph
146.
Which is smallest unit of memory?
a)
KB
b)
Byte
c)
Bit
d)
Word
147.
In C, which header is required for printf?
a)
stdio.h
b)
iostream
c)
math.h
d)
string.h
148.
Output of print("abc".upper())?
a)
abc
b)
ABC
c)
error
d)
Abc
149.
In Java, which keyword is used for inheritance with classes?
a)
extend
b)
extends
c)
implements
d)
inherit
150.
Which graph algorithm is used for cycle detection?
a)
DFS
b)
BFS
c)
Merge Sort
d)
Binary Search
151.
In Python, which keyword defines a function?
a)
fun
b)
def
c)
function
d)
define
152.
In C, which operator is used to get address of a variable?
a)
*
b)
&
c)
->
d)
%
153.
Which searching algorithm works only on sorted arrays?
a)
Linear
b)
Binary
c)
Hashing
d)
BFS
154.
Output of print(5 == 5.0)?
a)
True
b)
False
c)
Error
d)
None
155.
Who invented Python?
a)
Bjarne Stroustrup
b)
Guido van Rossum
c)
James Gosling
d)
Dennis Ritchie
156.
Which Java keyword prevents inheritance?
a)
super
b)
final
c)
const
d)
abstract
157.
In C++, which keyword creates object dynamically?
a)
malloc
b)
new
c)
allocate
d)
create
158.
In OS, "deadlock" means?
a)
Infinite loop
b)
No process executes
c)
Memory full
d)
Virus attack
159.
In Python, list("cat") gives?
a)
['c','a','t']
b)
['cat']
c)
('c','a','t')
d)
Error
160.
Which algorithm is used in Google Maps shortest path?
a)
BFS
b)
Dijkstra
c)
Merge Sort
d)
Prim’s
161.
In C, %d in printf is for?
a)
float
b)
string
c)
int
d)
char
162.
Which is not a loop in Java?
a)
for
b)
while
c)
repeat
d)
do-while
163.
In Python, what does is check?
a)
Value
b)
Identity
c)
Type
d)
None
164.
Which of these is not an IDE?
a)
PyCharm
b)
Eclipse
c)
Git
d)
VS Code
165.
Output of print("2" + "3")?
a)
5
b)
23
c)
Error
d)
None
166.
In networking, TCP stands for?
a)
Transfer Control Protocol
b)
Transmission Control Protocol
c)
Total Communication Protocol
d)
None
167.
Which algorithm is used for balanced binary search trees?
a)
AVL
b)
Quick Sort
c)
Bubble
d)
DFS
168.
In C++, what does << operator do in cout?
a)
Input
b)
Output
c)
Shift
d)
Error
169.
Which OS is open-source?
a)
Windows
b)
macOS
c)
Linux
d)
iOS
170.
In Python, None represents?
a)
False
b)
Empty
c)
Null
d)
Error
171.
Which algorithm divides array into halves?
a)
Merge Sort
b)
Bubble Sort
c)
Insertion
d)
Selection
172.
In Java, arrays are:
a)
Objects
b)
Primitive
c)
Keywords
d)
Functions
173.
Which is not a primary key feature in DBMS?
a)
Unique
b)
Nullable
c)
Non-null
d)
Identifies record
174.
In C, char typically requires?
a)
8 bits
b)
16 bits
c)
32 bits
d)
64 bits
175.
In Python, 3 > 2 > 1 evaluates to?
a)
True
b)
False
c)
Error
d)
None
176.
Which memory is volatile?
a)
Hard Disk
b)
ROM
c)
RAM
d)
SSD
177.
Which sorting algorithm is stable?
a)
Merge
b)
Quick
c)
Heap
d)
Selection
178.
In C++, destructor is prefixed with?
a)
@
b)
$
c)
~
d)
!
179.
In OS, which scheduling algorithm is "shortest job first"?
a)
SJF
b)
FCFS
c)
Round Robin
d)
Priority
180.
In Python, bool([]) gives?
a)
True
b)
False
c)
Error
d)
None
181.
Which Java package contains collections?
a)
java.io
b)
java.lang
c)
java.util
d)
java.sql
182.
In C, for(;;) loop runs?
a)
0 times
b)
Infinite
c)
1 time
d)
Error
183.
Which is not a linear data structure?
a)
Stack
b)
Queue
c)
Graph
d)
Array
184.
Output of print("Hi"*3)?
a)
HiHiHi
b)
3Hi
c)
Error
d)
Hi3
185.
Which algorithm is used in compression (like ZIP)?
a)
DFS
b)
Huffman
c)
Dijkstra
d)
Kruskal
186.
In Python, round(7.5) gives?
a)
7
b)
8
c)
Error
d)
None
187.
Which company created C#?
a)
Apple
b)
Microsoft
c)
Oracle
d)
IBM
188.
In C++, which access specifier allows inheritance but not external?
a)
public
b)
private
c)
protected
d)
default
189.
In DBMS, SQL stands for?
a)
Simple Query Language
b)
Structured Query Language
c)
Standard Question Language
d)
None
190.
In Python, set([1,1,2]) gives?
a)
[1,1,2]
b)
{1,2}
c)
(1,1,2)
d)
Error
191.
Which graph traversal uses a queue?
a)
DFS
b)
BFS
c)
Dijkstra
d)
Kruskal
192.
In Java, which keyword creates a subclass?
a)
inherit
b)
subclass
c)
extends
d)
implements
193.
Output of print(bool(""))?
a)
True
b)
false
c)
Error
d)
None
194.
In C, array index starts at?
a)
2
b)
1
c)
-1
d)
depends
195.
Which is faster in searching?
a)
Array
b)
Linked List
c)
Hash Table
d)
Stack
196.
In Python, print(type({}))?
a)
list
b)
dict
c)
set
d)
tuple
197.
In OS, "thrashing" relates to?
a)
Deadlock
b)
Paging
c)
CPU
d)
Network
198.
Which Java keyword prevents method override?
a)
abstract
b)
final
c)
static
d)
super
199.
In C, string ends with?
a)
\n
b)
\0
c)
EOF
d)
space
200.
In Python, print(10%3)?
a)
3
b)
1
c)
Error
100 %
