wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

funda

Total questions: 90

Worksheet time: 45mins

Name
Class
Date
1.

A computer system is a combination of:

a)

Only hardware

b)

Hardware and software that work together

c)

Only software

2.

Hardware refers to:

a)

Software programs

b)

Physical components of the computer

c)

Data and instructions

3.

Which of the following is NOT system software?

a)

A – Operating System

b)

B – Device Drivers

c)

C – Google Docs

4.

The three basic functions of a computer are:

a)

A – Input, Output, Storage

b)

B – Input, Process, Output

c)

C – Output, Storage, Process

5.

The CPU is responsible for:

a)

Storing data

b)

Processing data and instructions

c)

Displaying output

6.

A compiler is used to:

a)

Translate source code to machine code

b)

Store data

c)

Display output

7.

Machine language consists of:

a)

Letters and symbols

b)

Hexadecimal digits

c)

Binary digits (0s and 1s)

8.

The first step in the program development cycle is:

a)

Coding

b)

Testing

c)

Understanding the problem

9.

Flowcharts use a diamond shape for:

a)

Start/End

b)

Input/Output

c)

Decision making

10.

Pseudocode is:

a)

A – A human-readable plan of the program logic

b)

B – Machine code

c)

C – Binary code

11.

Variables are:

a)

Fixed values

b)

Named memory locations for data

c)

Instructions

12.

Constants are:

a)

Values that can be changed

b)

Values that cannot be changed

c)

Instructions

13.

The assignment operator (=) means:

a)

Compare two values

b)

Store the right-hand value into a variable

c)

Add two values

14.

Arithmetic operator for remainder:

a)

+

b)

-

c)

%

15.

Logical operator that checks both conditions:

a)

A – ||

b)

B – &&

c)

C – !

16.

The three main structures in structured programming:

a)

A – Input, Output, Storage

b)

B – Sequence, Selection, Loop

c)

C – Variable, Constant, Operator

17.

Spaghetti code means:

a)

Well-organized code

b)

Easy-to-read code

c)

Disorganized, hard-to-read code

18.

Logic gates are:

a)

Software programs

b)

Basic building blocks of digital circuits

c)

Output devices

19.

The AND gate outputs 1 only when:

a)

One input is 1

b)

Both inputs are 1

c)

Any input is 1

20.

The OR gate outputs 1 when:

a)

Both inputs are 1

b)

Both inputs are 0

c)

Any input is 1

21.

Looping allows a set of instructions to:

a)

Run once only.

b)

Repeat multiple times automatically.

c)

Stop after one execution.

22.

The main advantage of loops:

a)

Reduce repetition and save time.

b)

Make code longer.

c)

Increase errors.

23.

A definite loop means:

a)

The number of repetitions is unknown.

b)

The number of repetitions is known.

c)

The loop never ends.

24.

An indefinite loop means:

a)

The number of repetitions is known.

b)

The loop never ends.

c)

The number of repetitions is unknown.

25.

A loop control variable must be:

a)

A – Initialized, tested, and updated.

b)

B – Ignored.

c)

C – Randomly changed.

26.

Forgetting to update a loop variable causes:

a)

Definite loop.

b)

Loop to run once.

c)

Infinite loop.

27.

The for loop is used when:

a)

You do not know how many times to loop.

b)

You know exactly how many times to loop.

c)

The loop never ends.

28.

The while loop is a:

a)

A – Posttest loop.

b)

B – Pretest loop.

c)

C – Infinite loop.

29.

The do-while loop is a:

a)

A – Pretest loop.

b)

B – Infinite loop.

c)

C – Posttest loop.

30.

In pseudocode, 'FOR i = 1 TO 5' means:

a)

Loop runs once.

b)

Loop runs five times.

c)

Loop never runs.

31.

Nested loops are:

a)

Loops that run once.

b)

Loops inside other loops.

c)

Infinite loops.

32.

Common loop mistake: forgetting initialization causes:

a)

Unpredictable results.

b)

Loop runs once.

c)

Loop never runs.

33.

Wrong comparison operator may cause:

a)

Loop to run once.

b)

Loop to run more or fewer times than expected.

c)

Loop never runs.

34.

The purpose of loop validation is:

a)

To make code longer.

b)

To skip iterations.

c)

To ensure input is valid before continuing.

35.

A sentinel-controlled loop:

a)

Stops when a specific value is entered.

b)

Runs forever.

c)

Skips iterations.

36.

A counter-controlled loop:

a)

Runs forever.

b)

Uses a loop variable to track repetitions.

c)

Skips iterations.

37.

The keyword 'break' is used to:

a)

Continue the loop.

b)

Exit the loop immediately.

c)

Skip iteration.

38.

The keyword 'continue' is used to:

a)

Stop the loop.

b)

Skip current iteration and continue next.

c)

Exit the loop.

39.

Infinite loop means:

a)

Loop that runs once.

b)

Loop that never ends.

c)

Loop that skips iterations.

40.

Looping is preferred because:

a)

It makes programs shorter and efficient.

b)

It makes code longer.

c)

It increases errors.

41.

A while loop checks the condition before executing.

a)

True

b)

False

42.

A do-while loop may never run.

a)

True

b)

False

43.

For loops are ideal for unknown repetitions.

a)

True

b)

False

44.

Nested loops can be used for tables.

a)

True

b)

False

45.

Looping reduces redundancy in code.

a)

True

b)

False

46.

Forgetting to update a counter is harmless.

a)

True

b)

False

47.

Loops can be used for validation and calculations.

a)

True

b)

False

48.

The loop body executes only once in a while loop.

a)

True

b)

False

49.

A loop must always include an update step.

a)

True

b)

False

50.

Posttest loops always execute at least once.

a)

True

b)

False

51.

An array is: Choose the correct option.

a)

A collection of elements with different data types.

b)

A collection of elements with the same data type.

c)

A single value.

d)

A function.

52.

Each element in an array is identified by: Choose the correct option.

a)

A variable name.

b)

A function.

c)

An index number.

d)

A value.

53.

The first index in most programming languages is:

a)

0

b)

1

c)

-1

d)

2

54.

Arrays allow you to: Choose the correct option.

a)

Store a single value.

b)

Store and access multiple values using one variable name.

c)

Perform calculations.

d)

None of the above.

55.

A one-dimensional array stores: Choose the correct option.

a)

Functions

b)

Objects

c)

Data in a single line or list

d)

Multiple types

56.

A two-dimensional array represents: Choose the correct option.

a)

A single value

b)

Rows and columns (like a table)

c)

Functions

d)

None of the above

57.

The syntax to access the 3rd element in array 'A' is:

a)

A. A[2]

b)

B. A[3]

c)

C. A(3)

d)

D. A(2)

58.

Array initialization means:

a)

Deleting elements

b)

Accessing elements

c)

Giving starting values to elements

d)

Sorting elements

59.

Array traversal means:

a)

Sorting elements

b)

Accessing each element one by one

c)

Initializing elements

d)

Deleting elements

60.

Arrays are useful because: Choose the correct option.

a)

They simplify handling of related data

b)

They are always faster

c)

They use less memory

d)

None of the above

61.

Arrays can hold mixed data types.

a)

True

b)

False

62.

The index of the last element is (size - 1).

a)

True

b)

False

63.

Two-dimensional arrays need two indices.

a)

True

b)

False

64.

Arrays cannot be used in loops.

a)

True

b)

False

65.

Arrays help reduce multiple variable declarations.

a)

True

b)

False

66.

Using a loop to display all array values is called:

a)

Initializing the array.

b)

Traversing the array.

c)

Declaring the array.

67.

To find the sum of array elements, you use:

a)

Indexing.

b)

Selection.

c)

Accumulator with a loop.

68.

The array element A[4] refers to:

a)

The 4th element.

b)

The 5th element.

c)

The last element.

69.

A two-dimensional array can be visualized as:

a)

A – A matrix or table.

b)

B – A list.

c)

C – A single value.

70.

Accessing data from 2D array needs:

a)

One index.

b)

Three indices.

c)

Two indices (row and column).

71.

Arrays are stored in:

a)

Separate memory locations.

b)

Contiguous memory locations.

c)

Random memory locations.

72.

The length or size of an array:

a)

Is always 10.

b)

Is always 1.

c)

Tells how many elements it can hold.

73.

Out-of-bounds error occurs when:

a)

Accessing an index beyond the array size.

b)

Accessing the first element.

c)

Accessing the last element.

74.

Initializing an array without values gives:

a)

Random values.

b)

Default values (e.g., 0).

c)

Error.

75.

To input array values from user:

a)

Use a loop with input inside.

b)

Use a single input.

c)

Use a function.

76.

You can use nested loops for 2D arrays.

a)

True

b)

False

77.

Arrays can be used to store student grades.

a)

True

b)

False

78.

You can declare an array with size 0.

a)

True

b)

False

79.

Arrays can hold text data using strings.

a)

True

b)

False

80.

Arrays are fixed in size once declared.

a)

True

b)

False

81.

Which structure repeats until a condition becomes false?

a)

Selection.

b)

Loop.

c)

Declaration.

82.

Which structure makes decisions based on conditions?

a)

Loop.

b)

Declaration.

c)

Selection.

83.

The keyword used to declare an array:

a)

Depends on language (e.g., int, string).

b)

array

c)

varray

d)

arr

84.

To stop a loop early, use:

a)

Continue.

b)

Selection.

c)

Break.

85.

To skip one iteration, use:

a)

Break.

b)

Continue.

c)

Selection.

86.

The process of debugging means:

a)

Finding and fixing errors.

b)

Writing code.

c)

Designing algorithms.

d)

Testing programs.

87.

Logical operator for OR: ________

a)

||

b)

&&

c)

!

d)

==

88.

Logical operator for NOT: ________

a)

!

b)

&&

c)

||

d)

==

89.

Flowcharts can show loop structures.

a)

True

b)

False

90.

Programming requires planning before coding.

a)

True

b)

False