ICAS Programming and Digital Systems 5 — Questions and Answers
Question 1: What is an 'array' in programming?
- A single variable holding one value
- A collection of elements stored under one name (Correct answer)
- A type of conditional statement
- A network protocol
Correct answer: A collection of elements stored under one name
An array is a data structure that stores multiple values of the same type under a single variable name, accessed by index.
Question 2: Which of the following describes 'open source' software?
- Software that costs money to use
- Software whose source code is freely available to view and modify (Correct answer)
- Software only for government use
- Software that cannot be copied
Correct answer: Software whose source code is freely available to view and modify
Open source software has its source code publicly available, allowing anyone to view, use, and modify it.
Question 3: What does 'HTTP' stand for in web technology?
- HyperText Transfer Protocol (Correct answer)
- High-Tech Transfer Program
- HyperText Tracking Protocol
- Hosted Text Transfer Path
Correct answer: HyperText Transfer Protocol
HTTP stands for HyperText Transfer Protocol, which governs how data is transferred between web browsers and servers.
Question 4: What is the output of: 5 + 3 * 2 in most programming languages?
- 16
- 11 (Correct answer)
- 10
- 13
Correct answer: 11
Due to operator precedence, multiplication is performed before addition: 3 × 2 = 6, then 5 + 6 = 11.
Question 5: Which of the following best describes 'encryption'?
- Deleting sensitive files
- Converting data into a coded format to prevent unauthorized access (Correct answer)
- Compressing files to save space
- Copying data to a backup drive
Correct answer: Converting data into a coded format to prevent unauthorized access
Encryption transforms readable data (plaintext) into a scrambled format (ciphertext) that can only be decoded with the correct key.
Question 6: What is the purpose of a 'comment' in source code?
- To speed up program execution
- To store variable values
- To provide human-readable explanations that the compiler ignores (Correct answer)
- To define a new function
Correct answer: To provide human-readable explanations that the compiler ignores
Comments are notes written in code for human readers; the compiler or interpreter skips them during execution.
Question 7: In a spreadsheet program, what does a formula beginning with '=' do?
- Formats the cell color
- Saves the file
- Performs a calculation or function on cell data (Correct answer)
- Inserts a new row
Correct answer: Performs a calculation or function on cell data
In spreadsheet software like Excel, an '=' sign at the start of a cell entry tells the program to evaluate it as a formula or function.
What is an 'array' in programming?