1. Which of the following is used to ensure data integrity in database systems?
A. Indexing
B. Hashing
C. Transactions
D. Clustering
Answer: C) Transactions
Rationale: Transactions in databases help ensure that data remains consistent and
reliable through operations like commit and rollback.
2. In the C programming language, which of the following is used to define a constant?
A. const
B. variable
C. define
D. constant
Answer: A) const
Rationale: The const keyword is used in C to declare a constant whose value cannot be
changed during program execution.
3. The term "Cache" in computer architecture refers to:
A. A primary storage medium
,B. A temporary storage for frequently accessed data
C. A method for encrypting data
D. A secondary storage for backup purposes
Answer: B) A temporary storage for frequently accessed data
Rationale: Cache memory is a small, fast storage that holds frequently accessed data to
improve performance.
4. Which of the following is an example of a language used for web development?
A. Assembly
B. JavaScript
C. C++
D. COBOL
Answer: B) JavaScript
Rationale: JavaScript is commonly used for client-side scripting in web development.
5. In a database, a "primary key" is used to:
A. Index data for faster search
B. Uniquely identify a record
C. Provide a backup of the database
D. Relate tables together
Answer: B) Uniquely identify a record
, Rationale: A primary key uniquely identifies each record in a database table and
ensures that there are no duplicate entries.
6. What is the time complexity of binary search in the worst case?
A. O(n)
B. O(n log n)
C. O(log n)
D. O(1)
Answer: C) O(log n)
Rationale: Binary search works by dividing the search space in half at each step,
leading to a logarithmic time complexity of O(log n).
7. Which of the following is an example of a non-volatile memory?
A. RAM
B. Register
C. ROM
D. Cache
Answer: C) ROM
Rationale: ROM (Read-Only Memory) is non-volatile, meaning it retains its data even
when the power is turned off.
8. Which of the following is not a type of operating system?
A. Indexing
B. Hashing
C. Transactions
D. Clustering
Answer: C) Transactions
Rationale: Transactions in databases help ensure that data remains consistent and
reliable through operations like commit and rollback.
2. In the C programming language, which of the following is used to define a constant?
A. const
B. variable
C. define
D. constant
Answer: A) const
Rationale: The const keyword is used in C to declare a constant whose value cannot be
changed during program execution.
3. The term "Cache" in computer architecture refers to:
A. A primary storage medium
,B. A temporary storage for frequently accessed data
C. A method for encrypting data
D. A secondary storage for backup purposes
Answer: B) A temporary storage for frequently accessed data
Rationale: Cache memory is a small, fast storage that holds frequently accessed data to
improve performance.
4. Which of the following is an example of a language used for web development?
A. Assembly
B. JavaScript
C. C++
D. COBOL
Answer: B) JavaScript
Rationale: JavaScript is commonly used for client-side scripting in web development.
5. In a database, a "primary key" is used to:
A. Index data for faster search
B. Uniquely identify a record
C. Provide a backup of the database
D. Relate tables together
Answer: B) Uniquely identify a record
, Rationale: A primary key uniquely identifies each record in a database table and
ensures that there are no duplicate entries.
6. What is the time complexity of binary search in the worst case?
A. O(n)
B. O(n log n)
C. O(log n)
D. O(1)
Answer: C) O(log n)
Rationale: Binary search works by dividing the search space in half at each step,
leading to a logarithmic time complexity of O(log n).
7. Which of the following is an example of a non-volatile memory?
A. RAM
B. Register
C. ROM
D. Cache
Answer: C) ROM
Rationale: ROM (Read-Only Memory) is non-volatile, meaning it retains its data even
when the power is turned off.
8. Which of the following is not a type of operating system?