Which statement best describes C++ compared with C?
Q2
An object in C++ is:
Q3
Which statement about a C++ reference is correct?
Q4
Which feature is valid for a pointer but not for a normal reference?
Q5
Function overloading in C++ requires functions to differ in:
Q6
Which of the following can be overloaded for a user-defined class?
Q7
A constructor in C++:
Q8
What is the correct purpose of a destructor?
Q9
Which statement about `new` is correct?
Q10
Which access level is the default inside a `class` in C++?
Q11
What is the main purpose of a namespace in C++?
Q12
Which statement correctly compares `struct` and `class` in C++?
Q13
Which memory area is typically used for local variables inside a function?
Q14
A copy constructor is generally called when:
Q15
Shallow copy becomes risky mainly when a class contains:
Q16
Which statement correctly describes copy assignment?
Q17
Inside a non-static member function, `this` points to:
Q18
A static data member in a class is:
Q19
Which statement about static member functions is correct?
Q20
A friend function is mainly used when:
Q21
Which statement about inline functions is most accurate?
Q22
Which option best describes a deep copy?
Q23
Compared with `malloc()`, `new` in C++ additionally:
Q24
Which statement about heap memory is correct?
Q25
Inheritance in C++ is mainly used to:
Q26
Which type of inheritance is supported in C++ but often discussed carefully because it can introduce ambiguity?
Q27
Polymorphism in C++ means:
Q28
Which is an example of runtime polymorphism in C++?
Q29
A virtual function is primarily used to enable:
Q30
Why is a virtual destructor important in a polymorphic base class?
Q31
A pure virtual function is declared using:
Q32
A class with at least one pure virtual function is usually:
Q33
Object slicing occurs when:
Q34
Which statement correctly compares overloading and overriding?
Q35
If a base pointer points to a derived object and the called method is not virtual, C++ generally uses:
Q36
Which statement about abstract classes is correct?
Q37
Templates in C++ are mainly used for:
Q38
Which statement best describes a class template?
Q39
The STL mainly provides:
Q40
Which container is usually the default choice when you need a dynamic array with fast random access?
Q41
Which statement about `list` is correct?
Q42
Which container keeps keys sorted by default?
Q43
The average-case strength of `unordered_map` is:
Q44
An iterator in C++ is best understood as:
Q45
A lambda expression in C++ is:
Q46
The main purpose of `auto` in C++ is to:
Q47
Which statement about smart pointers is correct?
Q48
Which smart pointer type represents exclusive ownership?
Q49
RAII in C++ mainly means:
Q50
The Rule of Five extends the Rule of Three by adding:
Q51
Which statement best describes move semantics?
Q52
Which statement about `const` member functions is correct?
Q53
Which null-pointer literal should be preferred in modern C++?
Q54
Which cast performs runtime-checked downcasting in a polymorphic class hierarchy?
Q55
Which cast is the lowest-level and should usually be used very carefully?
Q56
In a `vector`, `size()` returns:
Q57
In a `vector`, `capacity()` refers to:
Q58
Which statement about C++ exceptions is correct?
Q59
Which is an example of a compile-time error?
Q60
Which is more likely to be a runtime error?
Q61
Which item is normally stored in a Process Control Block (PCB)?
Q62
In a multithreaded process, which resource is typically private to each thread rather than shared by all threads?
Q63
What is a common drawback of the many-to-one user-thread model?
Q64
A child process has finished execution, but its parent has not yet collected its exit status. What is the child process at this point?
Q65
Why does copy-on-write make fork() efficient in many real systems?
Q66
Which IPC mechanism usually gives the lowest overhead after setup when large amounts of data must be exchanged frequently?
Q67
Two threads increment a shared counter without synchronization and sometimes produce the wrong final value. What is the most precise name for this problem?
Q68
Which of the following is NOT one of the classic requirements for a correct critical-section solution?
Q69
Which statement best describes an orphan process?
Q70
In a typical process-based memory protection model, what usually happens if one thread in a process causes an unhandled segmentation fault?
Q71
If exact CPU burst times were known in advance, which scheduling algorithm minimizes average waiting time?
Q72
What is the most likely effect of choosing an extremely small time quantum in Round Robin scheduling?
Q73
Which technique is commonly used to reduce starvation in priority scheduling?
Q74
Which scheduling policy is the preemptive counterpart of Shortest Job First?
Q75
What best describes the convoy effect in FCFS scheduling?
Q76
Which metric measures the time from job arrival until the process first gets CPU service?
Q77
In non-preemptive priority scheduling, what happens if a higher-priority process arrives while a lower-priority process is currently running?
Q78
What is the defining idea of a multilevel feedback queue scheduler?
Q79
Which scheduling goal is most directly emphasized by Round Robin in a time-sharing system?
Q80
Which formula correctly defines turnaround time for a process?
Q81
Which statement best describes internal fragmentation?
Q82
A TLB miss means which of the following?
Q83
When does a page fault occur in a demand-paged system?
Q84
Belady's anomaly is classically associated with which page-replacement algorithm?
Q85
Which algorithm is commonly used as a practical approximation to LRU?
Q86
Which memory-allocation technique is more likely to suffer from external fragmentation?
Q87
Which situation most strongly suggests that a system is thrashing?
Q88
What is the main idea behind copy-on-write after fork()?
Q89
Which statement correctly describes demand paging?
Q90
If TLB lookup time is 10 ns, memory access time is 100 ns, and the TLB hit ratio is 80%, what is the effective access time assuming one memory access on a hit and two on a miss?
Q91
Which set contains all four Coffman conditions required for deadlock?
Q92
In a resource-allocation graph where each resource type has exactly one instance, what does a cycle imply?
Q93
What does it mean for the system to be in a safe state?
Q94
What key information does the Banker's algorithm require in advance from each process?
Q95
Which policy most directly prevents circular wait?
Q96
If processes are forced to request all needed resources at once before execution begins, which deadlock condition is being attacked most directly?
Q97
Which statement best distinguishes deadlock detection from deadlock avoidance?
Q98
Which of the following is a legitimate deadlock recovery technique after deadlock has been detected?
Q99
In a system where some resource types have multiple instances, a cycle in the resource-allocation graph means:
Q100
How does livelock differ from deadlock?
Q101
If the original filename of a file is deleted but another hard link to the same file still exists, what happens to the file data?
Q102
In a Unix-like file system, where is the filename typically stored?
Q103
What is the primary purpose of journaling in a file system?
Q104
What is a major drawback of contiguous file allocation?
Q105
Which allocation method most naturally supports direct access through an index structure rather than following a chain?
Q106
Which statement best describes C-SCAN disk scheduling?
Q107
Which RAID level provides mirroring rather than striping with parity?
Q108
What does it mean to mount a file system?
Q109
If two directory entries refer to the same inode, what is the relationship between them?
Q110
What is the main purpose of the page cache or file cache in an operating system?
Q111
Which statement correctly compares a system call with a library call?
Q112
Which action generally requires kernel-mode privilege?
Q113
Which statement best distinguishes an interrupt from an exception?
Q114
Which is a common advantage of a microkernel compared with a monolithic kernel?
Q115
What happens when a thread performs wait(P) on a counting semaphore whose value is currently 0?
Q116
Which statement about mutexes is most accurate?
Q117
What is the main benefit of DMA in I/O systems?
Q118
What is the primary role of the bootloader?
Q119
Why is spooling useful for devices such as printers?
Q120
What is a key advantage of memory-mapped file I/O through mmap-style mechanisms?
Q121
Python is commonly described as:
Q122
Dynamic typing in Python means:
Q123
Which statement about Python execution is most accurate?
Q124
Which type is immutable in Python?
Q125
Which type is best suited for storing unique values only?
Q126
A Python dictionary stores data as:
Q127
In Python, `==` checks:
Q128
In Python, `is` is mainly used to compare:
Q129
Which of the following is mutable?
Q130
A shallow copy of a nested list mainly means:
Q131
Why is a mutable default argument risky in Python?
Q132
What is the usual safe default when you want an optional list parameter?
Q133
In Python, `*args` collects extra positional arguments into a:
Q134
In Python, `**kwargs` collects extra keyword arguments into a:
Q135
A lambda function in Python is best described as:
Q136
Which construct is most directly used to create a list in a compact loop-like form?
Q137
Which statement correctly compares an iterable and an iterator?
Q138
A generator in Python is useful mainly because it:
Q139
Which keyword is used to make a function behave as a generator?
Q140
Which statement best describes Python argument passing?
Q141
A decorator in Python is mainly used to:
Q142
When we say functions are first-class objects in Python, we mean they can:
Q143
Which keyword is used inside a nested function to modify a variable from the nearest enclosing function scope?
Q144
Which statement about `global` is correct?
Q145
In an instance method, `self` refers to:
Q146
What is the main purpose of `__init__()`?
Q147
Which method type receives `cls` as its first automatic argument?
Q148
Which method type receives neither `self` nor `cls` automatically?
Q149
Inheritance in Python allows a class to:
Q150
Method overriding happens when:
Q151
Python supports multiple inheritance, which means:
Q152
MRO in Python stands for:
Q153
Why is `super()` commonly used?
Q154
Duck typing in Python emphasizes:
Q155
In Python, a single leading underscore in an attribute name usually means:
Q156
Abstraction in Python is mainly about:
Q157
Which keywords are directly associated with Python exception handling?
Q158
`raise` in Python is used to:
Q159
Why is `assert` not a full replacement for `raise` in production logic?
Q160
A context manager is commonly used with:
Q161
Why is the `with` statement preferred for file handling?
Q162
The GIL in CPython mainly affects:
Q163
For CPU-bound work in CPython, which approach is often preferred over threading?
Q164
Which statement best compares threads and processes in Python?
Q165
Python memory management in CPython mainly relies on:
Q166
Reference counting means an object can usually be cleaned up when:
Q167
A module in Python is usually:
Q168
Why do we use `if __name__ == "__main__"`?
Q169
Unpacking in Python is used to:
Q170
Which expression is an example of slicing?
Q171
A dataclass in Python is most useful when:
Q172
What does `@property` mainly help you do?
Q173
If `nums = [1, 2]`, what does `nums.append([3, 4])` do?
Q174
Which statement correctly compares `append()` and `extend()`?
Q175
Which statement about `sort()` and `sorted()` is correct?
Q176
`__repr__()` is mainly intended for:
Q177
A closure in Python is:
Q178
Compared with a list comprehension, a generator expression usually:
Q179
EAFP in Python means:
Q180
LBYL in Python means:
Q181
SQL is primarily used to:
Q182
A primary key should:
Q183
Which statement best describes a foreign key?
Q184
Which option correctly compares `WHERE` and `HAVING`?
Q185
Which statement about `DELETE`, `TRUNCATE`, and `DROP` is correct?
Q186
In SQL, `NULL` means:
Q187
Which condition is correct for checking missing values in SQL?
Q188
`GROUP BY` is mainly used to:
Q189
An `INNER JOIN` returns:
Q190
A `LEFT JOIN` returns:
Q191
A self join is used when:
Q192
`UNION` differs from `UNION ALL` because `UNION`:
Q193
A subquery is:
Q194
Which statement best compares `IN` and `EXISTS`?
Q195
A CTE is introduced using:
Q196
To list all customers even if they have no matching orders, which join is most appropriate?
Q197
Which of the following is an aggregate function?
Q198
If a column contains nulls, `COUNT(column)` will:
Q199
`COUNT(*)` returns:
Q200
A window function differs from `GROUP BY` mainly because it:
Q201
Which function gives every row a unique running number even when values tie?
Q202
Which function leaves gaps in ranking after tied values?
Q203
Which tool is commonly used to assign labels like 'High', 'Medium', and 'Low' in query output?
Q204
If you only want unique rows in the query result, which keyword is most direct?
Q205
Normalization is mainly used to:
Q206
1NF mainly requires that:
Q207
Denormalization is usually considered when:
Q208
A composite key uses:
Q209
Which of the following is a constraint?
Q210
Which statement best describes a view?
Q211
An index is mainly created to:
Q212
Which statement about indexes is correct?
Q213
A transaction is best described as:
Q214
In ACID, atomicity means:
Q215
Which ACID property is most directly about committed data surviving a crash?
Q216
Which command makes current transaction changes permanent?
Q217
Which command is used to undo uncommitted transaction work?
Q218
A `SAVEPOINT` is useful because it:
Q219
Isolation levels mainly control:
Q220
A strong first step for tuning a slow SQL query is to: