# Persistent Systems Core CS Questions with Answers

8 previously-asked core cs questions from Persistent Systems's hiring process, each with the correct answer and a worked explanation. Written against the company's actual test pattern.

_Source: Astra (https://useastra.in). Updated 2026-09-05._

### 1. Which of the following is the fastest for the CPU to access?

A. CPU registers
B. RAM
C. Cache
D. Hard disk

**Answer:** CPU registers

**Explanation:** Registers are inside the CPU and are the fastest storage, faster than cache, RAM, and disk.

### 2. A minimal set of attributes that uniquely identifies a row is called?

A. Candidate key
B. Foreign key
C. Composite key
D. Secondary key

**Answer:** Candidate key

**Explanation:** A candidate key is a minimal super key; any of them can be chosen as the primary key.

### 3. When one object contains another object as a member, this relationship is called?

A. Composition
B. Inheritance
C. Overloading
D. Overriding

**Answer:** Composition

**Explanation:** Composition is a has-a relationship where one object is built from other objects.

### 4. Which data structure does the system use internally to manage recursive calls?

A. Queue
B. Stack
C. Heap
D. Array

**Answer:** Stack

**Explanation:** Recursive calls are tracked on the call stack, which follows Last In First Out order.

### 5. During a context switch, what does the operating system save?

A. The process state in its PCB
B. Only the program counter
C. Nothing at all
D. The entire RAM

**Answer:** The process state in its PCB

**Explanation:** The OS saves the process context (registers, program counter, and more) in the Process Control Block so it can resume later.

### 6. HTTP is best described as which kind of protocol?

A. Stateless
B. Stateful
C. Always encrypted
D. Connection guaranteed reliable

**Answer:** Stateless

**Explanation:** HTTP is stateless: each request is independent and the server does not retain client state between requests by default.

### 7. What does NULL represent for a pointer in C?

A. A pointer to no valid memory address
B. A division by zero
C. An empty string
D. An error code

**Answer:** A pointer to no valid memory address

**Explanation:** NULL is a pointer value indicating it does not point to any valid object.

### 8. Which SQL command permanently saves the changes made in a transaction?

A. COMMIT
B. ROLLBACK
C. SAVE
D. GRANT

**Answer:** COMMIT

**Explanation:** COMMIT makes all changes in the current transaction permanent; ROLLBACK undoes them.

More Persistent Systems preparation, including the full recruitment process: https://useastra.in/campus/persistent
