EmSAT Computer Science 3 — Questions and Answers
Question 1: Which data structure uses LIFO (Last In, First Out) ordering?
- Queue
- Stack (Correct answer)
- Linked List
- Binary Tree
Correct answer: Stack
A stack follows LIFO order, meaning the last element added is the first to be removed.
Question 2: What is the output of the expression: 17 MOD 5?
- 3
- 2 (Correct answer)
- 1
- 4
Correct answer: 2
17 divided by 5 gives quotient 3 and remainder 2, so 17 MOD 5 = 2.
Question 3: Which of the following is a characteristic of an algorithm?
- It must run indefinitely
- It must have a finite number of steps (Correct answer)
- It cannot use loops
- It must be written in a specific language
Correct answer: It must have a finite number of steps
An algorithm must terminate after a finite number of steps to produce a result.
Question 4: In a relational database, what does a primary key ensure?
- Records are sorted alphabetically
- Each record is uniquely identified (Correct answer)
- All fields have default values
- Tables are linked by foreign keys
Correct answer: Each record is uniquely identified
A primary key uniquely identifies each record in a database table, ensuring no duplicates.
Question 5: Which layer of the OSI model is responsible for routing packets between networks?
- Data Link Layer
- Transport Layer
- Network Layer (Correct answer)
- Session Layer
Correct answer: Network Layer
The Network Layer (Layer 3) handles logical addressing and routing of packets across networks.
Question 6: What does HTML stand for?
- Hyper Text Markup Language (Correct answer)
- High Transfer Machine Language
- Hyperlink and Text Markup Logic
- Home Tool Markup Language
Correct answer: Hyper Text Markup Language
HTML stands for Hyper Text Markup Language, used to structure content on the web.
Question 7: Which of the following best describes an operating system?
- A program that edits documents
- Software that manages hardware and software resources (Correct answer)
- A network protocol for data transfer
- A tool for designing databases
Correct answer: Software that manages hardware and software resources
An operating system manages hardware resources and provides services for application software.
Which data structure uses LIFO (Last In, First Out) ordering?