Font size
WorksheetsComputer Science FFF QUIZ
Total questions: 10
Worksheet time: 8mins
Which of the following are high-level programming languages?
a) Python
b) Java
c) Assembly
d) Machine Language
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) "for" loop executes a fixed number of times
b) "while" loop is used when the number of iterations is known
c) Both "for" and "while" loops can create infinite loops
d) "for" loop is mandatory in C
Which constructs allow decision-making in C?
Answer: a) if statements, c) switch statements
a) if statements
b) do-while loops
c) switch statements
d) sequence control
Which of these are control structures in C?
a) Loops
b) Pointers
c) Conditional statements
d) Classes
In C, which are primitive data types?
a) int
b) float
c) array
d) struct
Which tools translate code to machine language?
a) Interpreter
b) Compiler
c) Processor
d) Assembler
Which two loops in C guarantee at least one execution?
a) for loop
b) while loop
c) do-while loop
d) sequence control
Which two of the following are valid syntax for a basic C program structure?
a) int main() { return 0; }
b) main() void { return 0; }
c) int start() { return; }
d) int main() { printf("Hello, World!"); return 0; }
Which of the following C code snippets will correctly calculate the sum of a and b?
a) float sum = a + b
b) int sum = a + b;
c) a + b = sum;
d) int sum = (int)a + (int)b;
Which statements about the following C code snippet are true?
a) The code will print numbers from 0 to 4.
b) The code has a syntax error.
c) The code will print numbers from 1 to 5.
d) The loop runs exactly 5 times.
