Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q1351: To resize a previously allocated memory block, use ________.
  • A: malloc()
  • B: realloc()
  • C: free()
  • D: new()
View Answer
B

Q1352: In heap memory management, a heap is considered a ________ object.
  • A: variable
  • B: system
  • C: windows
  • D: user-defined
View Answer
C

Q1353: To allocate memory from a heap in Windows, you must first get a ________.
  • A: pointer
  • B: buffer
  • C: handle
  • D: thread
View Answer
C

Q1354: Which API is used to create a new heap in Windows?
  • A: HeapAlloc()
  • B: HeapInit()
  • C: HeapCreate()
  • D: CreateHeap()
View Answer
C

Q1355: HeapCreate() allocates memory in which manner?
  • A: On demand
  • B: Initially
  • C: Only when accessed
  • D: When freed
View Answer
B

Q1356: What is the purpose of dwInitialSize in HeapCreate()?
  • A: Set page size
  • B: Set heap handle
  • C: Set initial heap size
  • D: None of these
View Answer
C

Q1357: If dwMaximumSize is zero, the heap can grow up to
  • A: 1 GB
  • B: Physical memory
  • C: Available virtual memory
  • D: Heap limit
View Answer
C

Q1358: What data type is used for dwInitialSize and dwMaximumSize?
  • A: DWORD
  • B: HANDLE
  • C: SIZE_T
  • D: ULONG
View Answer
C

Q1359: What does SIZE_T ensure?
  • A: Error-free operation
  • B: Portability between 32/64-bit platforms
  • C: Execution speed
  • D: Compilation accuracy
View Answer
B

Q1360: The heap size is adjusted to
  • A: Heap handle size
  • B: Exact bytes
  • C: Nearest multiple of page size
  • D: Random value
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now