wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science FFF QUIZ

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

Which of the following are high-level programming languages?

a)

a) Python

b)

b) Java

c)

c) Assembly

d)

d) Machine Language

2.

Which statements about "for" and "while" loops are true?


    • Answer: a) "for" loop executes a fixed number of times, c) Both "for" and "while" loops can create infinite loops

a)

a) "for" loop executes a fixed number of times

b)

b) "while" loop is used when the number of iterations is known

c)

c) Both "for" and "while" loops can create infinite loops

d)

d) "for" loop is mandatory in C

3.

Which constructs allow decision-making in C?


  • Answer: a) if statements, c) switch statements

a)

a) if statements

b)

b) do-while loops

c)

c) switch statements

d)

d) sequence control

4.

Which of these are control structures in C?

a)

a) Loops

b)

b) Pointers

c)

c) Conditional statements

d)

d) Classes

5.

In C, which are primitive data types?

a)

a) int

b)

b) float

c)

c) array

d)

d) struct

6.

Which tools translate code to machine language?

a)

a) Interpreter

b)

b) Compiler

c)

c) Processor

d)

d) Assembler

7.

Which two loops in C guarantee at least one execution?

a)

a) for loop

b)

b) while loop

c)

c) do-while loop

d)

d) sequence control

8.

Which two of the following are valid syntax for a basic C program structure?

a)

a) int main() { return 0; }

b)

b) main() void { return 0; }

c)

c) int start() { return; }

d)

d) int main() { printf("Hello, World!"); return 0; }

9.

Which of the following C code snippets will correctly calculate the sum of a and b?

a)

a) float sum = a + b

b)

b) int sum = a + b;

c)

c) a + b = sum;

d)

d) int sum = (int)a + (int)b;

10.
  1. Which statements about the following C code snippet are true?

a)

a) The code will print numbers from 0 to 4.

b)

b) The code has a syntax error.

c)

c) The code will print numbers from 1 to 5.

d)
  • d) The loop runs exactly 5 times.