Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 143
Q3121:
The main function creates threads using which function?
A. CreateThread()
B. _startThread()
C. _beginthreadex()
D. pthread_create()
Correct Answer: C
Chapter: 143
Q3122:
The program is written using which language?
A. Python
B. Java
C. C
D. C++
Correct Answer: C
Chapter: 143
Q3123:
Checksum is generated using
A. MD5 XOR
B. SHA-1
C. Random XOR
D. Timestamp XOR
Correct Answer: C
Chapter: 143
Q3124:
Each message is validated before display to ensure
A. Data loss
B. Correct timestamp
C. No corruption
D. Thread integrity
Correct Answer: C
Chapter: 143
Q3125:
The message data is validated by
A. Matching sequence number
B. Checking time
C. Duplicating content
D. XOR of values
Correct Answer: D
Chapter: 143
Q3126:
The value of `mBlock.nLost` is calculated as
A. mSequence - nCons + 1
B. mSequence + nCons
C. nCons - mSequence
D. nCons / mSequence
Correct Answer: A
Chapter: 143
Q3127:
_____ is NOT part of the user prompt options.
A. c
B. s
C. r
D. x
Correct Answer: C
Chapter: 143
Q3128:
_tprintf is used in the program for
A. Displaying messages in console
B. Logging
C. Printing to file
D. Thread logs
Correct Answer: A
Chapter: 143
Q3129:
The message is displayed if
A. Checksum is invalid
B. mBlock.fReady == 1
C. fStop == 1
D. User exits
Correct Answer: B
Chapter: 143
Q3130:
InterlockedIncrement function is used to
A. Increment integer safely
B. Stop thread
C. Exit loop
D. Lock section
Correct Answer: A
Chapter: 143
Q3131:
The message block is updated in
A. Main thread
B. Consumer only
C. Producer only
D. Both producer and consumer
Correct Answer: D
Chapter: 143
Q3132:
Each entry of mData is filled with
A. Random input
B. Sequential input
C. User input
D. Command line input
Correct Answer: A
Chapter: 143
Q3133:
When mBlock.fStop is set to 1, the threads
A. Continue running
B. Exit after loop
C. Restart
D. Wait forever
Correct Answer: B
Chapter: 143
Q3134:
The value of mBlock.fReady is set to 1
A. Before filling data
B. After validation
C. After message is filled
D. When stop is set
Correct Answer: C
Chapter: 143
Q3135:
Checksum mismatch indicates
A. Correct message
B. Corrupted message
C. Reused message
D. Old message
Correct Answer: B
Chapter: 143
Q3136:
The Producer calls which function to prepare the message?
A. MessageDisplay
B. MessageFill
C. MessageCheck
D. MessageSet
Correct Answer: B
Chapter: 143
Q3137:
Checksum is calculated using which operation?
A. AND
B. OR
C. XOR
D. NOT
Correct Answer: C
Chapter: 143
Q3138:
The mTimestamp stores the
A. Duration
B. Message creation time
C. Message end time
D. Message size
Correct Answer: B
Chapter: 143
Q3139:
Which of the following does not appear in MSG_BLOCK?
A. fStop
B. mGuard
C. hMutex
D. fReady
Correct Answer: C
Chapter: 144
Q3140:
What is the full form of 'Mutex'?
A. Mutual Extent
B. Multiple Execution
C. Mutual Exclusion
D. Module Exit
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now