Home / Practice / Class 12 / Computer Science / Programming and arrays
Programming and arrays
5 Class 12 Computer Science questions with answers and explanations.
Printable worksheet with answer key
All questions with answers
-
An array stores:
- 1 Multiple values of the same type
- 2 Only one value
- 3 Only text
- 4 Only images
Show answer
Correct answer: Multiple values of the same type
An array holds a list of items.
Report a mistake
-
The first index of an array in C is:
- 1 Depends on the size
- 2 -1
- 3 1
- 4 0
Show answer
Correct answer: 0
Arrays are indexed from 0.
Report a mistake
-
A function is used to:
- 1 Compile only
- 2 Group code that can be reused
- 3 Print only
- 4 Delete code
Show answer
Correct answer: Group code that can be reused
Functions make code reusable.
Report a mistake
-
Which of these is a relational operator?
Show answer
Correct answer: >
The greater than sign compares values.
Report a mistake
-
The number of times `for (i = 0; i < 5; i++)` runs its body is:
Show answer
Correct answer: 5
i takes values 0 to 4, so five times.
Report a mistake
More Computer Science topics