Govt. Exams
Entrance Exams
BASE is an alternative to ACID, prioritizing availability and partition tolerance. It accepts temporary inconsistencies that resolve eventually (eventual consistency).
Zero-day vulnerabilities are previously unknown exploits with no patch. They're extremely dangerous because users have no defense until vendors develop and release fixes.
CAP theorem (Brewer's theorem) states distributed systems must choose 2 of 3 properties: strong consistency (C), continuous availability (A), or tolerance to network partitions (P).
Graph databases excel at querying relationships with O(1) traversal time, whereas relational databases require expensive JOIN operations for similar queries.
Parameterized queries prevent SQL injection by separating query structure from data, ensuring user input cannot be interpreted as executable code.
TCP operates at Layer 4 (Transport) and IP at Layer 3 (Network) in the OSI model. Together they form the TCP/IP protocol suite.
Eventual consistency is a model in NoSQL and distributed systems where updates propagate asynchronously, achieving consistency over time rather than immediately.
A deadlock occurs when two or more transactions wait for resources held by each other, creating a circular wait condition that prevents progress.
int x = 5; // binary: 0101
int y = 3; // binary: 0011
printf("%d", x ^ y); // XOR operation
XOR operation: 5 ^ 3. Binary: 0101 ^ 0011 = 0110 = 6. XOR returns 1 when bits are different, 0 when same.
int func(int n) {
if(n
This function calculates factorial. func(4) = 4 * func(3) = 4 * (3 * func(2)) = 4 * (3 * (2 * func(1))) = 4 * 3 * 2 * 1 = 24.