Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q1581: In the syntax `type _based(base) declarator`, the `base` refers to _______.
  • A: the base pointer to which offsets are relative
  • B: the start of the file
  • C: the size of the file
  • D: the physical memory address
View Answer
A

Q1582: Which of the following statements about based pointers is TRUE?
  • A: They are absolute memory addresses
  • B: They are offsets relative to another pointer
  • C: They cannot be used with MapViewOfFile
  • D: They always point to static memory
View Answer
B

Q1583: The declaration `DWORD _based(pInFile) *pSize;` means pSize is a pointer based relative to _______.
  • A: pInFile
  • B: NULL
  • C: the base of the program
  • D: file size
View Answer
A

Q1584: The syntax for based pointers forces the use of which operator?
  • A: &
  • B: *
  • C: ->
  • D: .
View Answer
B

Q1585: Based pointers are used to ensure pointer values are valid _______.
  • A: only within a single program execution
  • B: between different program executions
  • C: across multiple mapped file views
  • D: only for stack variables
View Answer
C

Q1586: A typedef can be used to fix the awkward syntax of based pointers that requires explicit use of _______.
  • A: *
  • B: &
  • C: ->
  • D: .
View Answer
A

Q1587: Pointers stored in a mapped file should be _______ to remain valid when the file is remapped.
  • A: absolute
  • B: based
  • C: on the heap
  • D: ignored
View Answer
B

Q1588: Based pointers store offsets relative to another pointer rather than _______.
  • A: absolute memory addresses
  • B: function addresses
  • C: static variables
  • D: local variables
View Answer
A

Q1589: In Visual C++, the `_based` keyword allows pointers to be _______.
  • A: relative offsets
  • B: absolute addresses
  • C: constants
  • D: variables
View Answer
A

Q1590: The pointer `pInFile` in the example is initialized to _______.
  • A: NULL
  • B: a valid memory address
  • C: the base address of the file
  • D: the current stack pointer
View Answer
A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now