wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Algorithmization and Programming Quiz

Total questions: 71

Worksheet time: 12mins

Name
Class
Date
1.

Which operator is used for conditional branching in C++ ?

a)

goto

b)

if

c)

continue

d)

break

2.

What type of loop repeats a block of code while a condition is true ?

a)

for loop

b)

do-while loop

c)

while loop

d)

switch

3.

Which data type is used to store a sequence of characters in C++ ?

a)

int

b)

float

c)

char

d)

string

4.

What is an algorithm ?

a)

A description of a sequence of actions to solve a problem

b)

A random set of actions

c)

A high-level programming language

d)

A data file

5.

Which of the following is a valid variable name in Python ?

a)

1variable

b)

variable_1

c)

variable-1

d)

variable.1

6.

Which property must an algorithm have ?

a)

Randomness

b)

Ambiguity

c)

Definiteness

d)

Infinity

7.

What are common ways to represent an algorithm ?

a)

Pseudocode, Flowchart

b)

Only programming code

c)

Only machine code

d)

Verbal description only

8.

Which of the following is NOT a type of algorithm ?

a)

Linear

b)

Branching

c)

Cyclic

d)

Random

9.

What is the first step in problem solving ?

a)

Code writing

b)

Testing

c)

Problem analysis

d)

Debugging

10.

An algorithm that stops after a finite number of steps is said to be:

a)

Infinite

b)

erminating

c)

Iterative

d)

Conditional

11.

Which method is commonly used for writing algorithms ?

a)

HTML

b)

CSS

c)

Pseudocode

d)

SQL

12.

A step-by-step solution to a problem is called:

a)

A flowchart

b)

An algorithm

c)

An error

d)

A syntax

13.

Which component is necessary for a flowchart ?

a)

Syntax rules

b)

Visual symbols

c)

HTML tags

d)

SQL queries

14.

Algorithms are independent of:

a)

Problem description

b)

Programming languages

c)

Execution steps

d)

Logical flow

15.

Which of the following is a valid variable name in C++ ?

a)

1variable

b)

variable1

c)

variable-1

d)

variable.1

16.

What is the data type for real numbers in C++ ?

a)

int

b)

char

c)

float

d)

string

17.

Which of these is a Python keyword ?

a)

number

b)

float

c)

def

d)

variable

18.

What is the default value of an uninitialized int variable in C++ ?

a)

0

b)

1

c)

Undefined behavior

d)

Null

19.

Which of the following is a string data type ?

a)

int

b)

char

c)

bool

d)

string

20.

Which of the following correctly declares a constant in C++ ?

a)

const int x = 5;

b)

int const x;

c)

int constant x;

d)

define const x;

21.

In Python, which symbol is used to assign a value to a variable ?

a)

==

b)

:=

c)

=

d)

=>

22.

What is the size of 'char' data type in C++ ?

a)

4 bytes

b)

2 bytes

c)

1 byte

d)

8 bytes

23.

Which keyword is used to define a floating-point variable in C++ ?

a)

int

b)

bool

c)

float

d)

string

24.

Python is considered to be:

a)

Dynamically typed

b)

Statically typed

c)

Machine language

d)

Markup language

25.

Which of the following is a correct way to represent an algorithm ?

a)

Pseudocode

b)

Verbal description only

c)

Machine code

d)

Syntax rules

26.

Which type of algorithm involves decision making ?

a)

Linear

b)

Branching

c)

Cyclic

d)

Sequential

27.

What is the purpose of debugging ?

a)

Creating new algorithms

b)

Finding and fixing errors

c)

Compiling code

d)

Writing pseudocode

28.

Which data type is used to store decimal numbers in Python ?

a)

int

b)

float

c)

str

d)

bool

29.

What is the output of 3 + 2 * 2 in Python ?

a)

10

b)

7

c)

12

d)

9

30.

Which keyword is used to define a function in Python ?

a)

func

b)

function

c)

define

d)

def

31.

In C++, which symbol is used for comments ?

a)

//

b)

/*

c)

*/

d)

#

32.

What does IDE stand for ?

a)

Integrated Development Environment

b)

Integrated Debugging Environment

c)

Internal Development Execution

d)

Interface Development Environment

33.

Which of the following is a valid loop in C++ ?

a)

repeat

b)

loop

c)

while

d)

during

34.

Which of the following is a mutable data type in Python ?

a)

tuple

b)

list

c)

string

d)

int

35.

What does SQL stand for ?

a)

Structured Query Language

b)

Simple Query Language

c)

Sequential Query Language

d)

Strong Query Language

36.

Which command is used to retrieve data from a database ?

a)

SELECT

b)

GET

c)

EXTRACT

d)

FETCH

37.

What is the size of an int in C++ (typically) ?

a)

2 bytes

b)

4 bytes

c)

8 bytes

d)

16 bytes

38.

Which one is a Python library for creating graphs ?

a)

NumPy

b)

Pandas

c)

Matplotlib

d)

Seaborn

39.

Which operator is used to compare two values in Python ?

a)

=

b)

==

c)

=>

d)

:=

40.

Which loop executes at least once regardless of the condition ?

a)

for

b)

while

c)

do-while

d)

foreach

41.

Which statement correctly closes a file in Python ?

a)

file.close()

b)

close(file)

c)

file.shutdown()

d)

shutdown(file)

42.

What is a key feature of MongoDB ?

a)

Relational tables

b)

Document-based storage

c)

Compiled queries

d)

Flat file database

43.

Which keyword creates a loop in Python ?

a)

loop

b)

repeat

c)

while

d)

iterate

44.

What is the output type of the input() function in Python ?

a)

int

b)

str

c)

float

d)

bool

45.

Which file extension is standard for a Python script ?

a)

.txt

b)

.py

c)

.java

d)

.cpp

46.

Which keyword is used for branching in C++ ?

a)

if

b)

goto

c)

continue

d)

break

47.

Which of the following is NOT a Python data type ?

a)

list

b)

dictionary

c)

array

d)

tuple

48.

What is a one-dimensional array ?

a)

Array with multiple rows and columns

b)

Array with a single row or column

c)

Nested array

d)

Linked array

49.

Which of these is a conditional operator in Python ?

a)

<

b)

+

c)

*

d)

&

50.

Which keyword is used to terminate a loop in Python ?

a)

stop

b)

exit

c)

break

d)

end

51.

Which data type is used to store a single character in C++ ?

a)

int

b)

char

c)

float

d)

string

52.

Which of the following is a correct Python list ?

a)

{1, 2, 3}

b)

(1, 2, 3)

c)

[1, 2, 3]

d)

<1, 2, 3>

53.

What is the purpose of a flowchart ?

a)

To execute code

b)

To describe algorithm steps visually

c)

To compile programs

d)

To debug code

54.

What is indentation in Python ?

a)

Code optimization

b)

Visual alignment

c)

Syntax requirement

d)

Optional formatting

55.

Which keyword is used to create a loop in C++ ?

a)

for

b)

foreach

c)

loop

d)

repeat

56.

Which function is used to get the length of a list in Python ?

a)

length()

b)

count()

c)

size()

d)

len()

57.

What is a tuple in Python ?

a)

Mutable sequence

b)

Immutable sequence

c)

Mutable dictionary

d)

Immutable dictionary

58.

Which database uses tables and rows ?

a)

MongoDB

b)

Cassandra

c)

MySQL

d)

Neo4j

59.

Which operator is used for logical AND in Python ?

a)

&&

b)

&

c)

and

d)

&&&

60.

Which function is used to read input from the user in Python ?

a)

input()

b)

read()

c)

get()

d)

scanf()

61.

Which type of error is caused by incorrect syntax ?

a)

Runtime error

b)

Syntax error

c)

Logical error

d)

Compilation error

62.

Which library is commonly used for data science in Python ?

a)

Flask

b)

NumPy

c)

Tkinter

d)

Django

63.

Which type of file is used to permanently store data ?

a)

Text file

b)

Source code

c)

Header file

d)

Object file

64.

Which of the following is NOT a looping structure ?

a)

for

b)

while

c)

if

d)

do-while

65.

Which of these is a composite data type ?

a)

char

b)

int

c)

record

d)

do-whileloat

66.

What is a record ?

a)

A type for functions

b)

A group of related data items

c)

A Python library

d)

A SQL command

67.

What is Matplotlib used for ?

a)

Web development

b)

Database management

c)

Data visualization

d)

Networking

68.

What does CSV stand for ?

a)

Comma Separated Values

b)

Centralized Server Variable

c)

Critical Simple Variable

d)

Complex Separated Vector

69.

Which keyword is used for exception handling in Python ?

a)

except

b)

exception

c)

handle

d)

catch

70.

Which of these is NOT a database ?

a)

MySQL

b)

MongoDB

c)

SQLite

d)

Matplotlib

71.

Which C++ keyword is used for defining constants ?

a)

constant

b)

const

c)

define

d)

static