Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q1401: The lpMem in HeapReAlloc() refers to _______.
  • A: newly allocated memory
  • B: block from another heap
  • C: heap size limit
  • D: previously allocated block
View Answer
D

Q1402: The block size in HeapReAlloc() must be less than or equal to _______.
  • A: 0x7FFF
  • B: 0xFFFFF
  • C: 0x7FFF8
  • D: 1MB
View Answer
C

Q1403: The HEAP_ZERO_MEMORY flag in HeapReAlloc() initializes only _______.
  • A: entire memory
  • B: old memory
  • C: new memory
  • D: unused memory
View Answer
C

Q1404: If HEAP_GENERATE_EXCEPTIONS is already set in HeapCreate(), what happens when it's set again in HeapAlloc()?
  • A: It takes priority
  • B: It causes crash
  • C: It is ignored
  • D: It duplicates behavior
View Answer
C

Q1405: HEAP_NO_SERIALIZE in HeapAlloc() should be used when _______.
  • A: security is priority
  • B: thread safety is required
  • C: thread safety is not required
  • D: data must be encrypted
View Answer
C

Q1406: hHeap in HeapAlloc() refers to _______.
  • A: size of memory
  • B: return value of malloc
  • C: the heap handle from which memory is allocated
  • D: heap ID
View Answer
C

Q1407: HeapAlloc() function syntax requires which three parameters?
  • A: hHeap, dwBytes, lpMem
  • B: hHeap, dwFlags, dwBytes
  • C: hHeap, flags, size
  • D: hHeap, exception, pointer
View Answer
B

Q1408: HEAP_REALLOC_IN_PLACE_ONLY restricts memory block to be _______.
  • A: of maximum size
  • B: shared between threads
  • C: located next to previous block
  • D: moved to system cache
View Answer
C

Q1409: dwFlags in HeapReAlloc() may contain which combination of flags?
  • A: HEAP_CREATE_ENABLE_EXECUTE only
  • B: HEAP_REALLOC_IN_PLACE_ONLY only
  • C: HEAP_ZERO_MEMORY and HEAP_NO_SERIALIZE
  • D: All of the above
View Answer
C

Q1410: The value 0x7FFF8 is approximately equal to _______.
  • A: 1 MB
  • B: 0.5 MB
  • C: 64 KB
  • D: 128 KB
View Answer
B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now