System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1341: The return value INVALID_HANDLE_VALUE is used when
- A: functions succeed
- B: system loads
- C: memory is allocated
- D: an invalid file handle is encountered
View Answer
D
Q1342: Why might you want to use distinct heaps for different data structures?
- A: For saving disk
- B: For organizing data
- C: For better performance
- D: For networking
View Answer
C
Q1343: Which one of the following is NOT a C standard heap function?
- A: malloc()
- B: free()
- C: append()
- D: realloc()
View Answer
C
Q1344: calloc() function in C is used to
- A: Allocate memory without initializing
- B: Free memory
- C: Allocate memory with initialization
- D: Reclaim memory
View Answer
C
Q1345: realloc() in C is used to
- A: Reallocate memory block
- B: Reallocate file
- C: Reassign pointer
- D: Reduce memory usage
View Answer
A
Q1346: Heap handle is required to
- A: allocate memory from the heap
- B: create processes
- C: manage threads
- D: free stack memory
View Answer
A
Q1347: The heap in Windows is accessed using ________.
- A: a function name
- B: a handle
- C: a structure
- D: a class
View Answer
B
Q1348: Every process in Windows has a ________ heap by default.
- A: static
- B: single
- C: default
- D: primary
View Answer
C
Q1349: When managing different data structures, ________ heaps may be beneficial.
- A: no
- B: two
- C: multiple
- D: same
View Answer
C
Q1350: The function ________ dynamically allocates memory with initialization.
- A: malloc()
- B: free()
- C: calloc()
- D: realloc()
View Answer
C