System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q471: If n=1 in Caesar Cipher, 'Z' is replaced by _______.
- A: A
- B: Y
- C: B
- D: C
View Answer
A
Q472: The formula C = (P + n) mod 26 is used because there are ______ alphabets.
- A: 128
- B: 26
- C: 256
- D: 52
View Answer
B
Q473: When encrypting ASCII characters, the modulo used is _______.
- A: 128
- B: 26
- C: 256
- D: 52
View Answer
C
Q474: In ASCII-based Caesar Cipher, if P is the plain text byte and n is the shift, the cipher text C is calculated as _______.
- A: (P - n) mod 256
- B: (P + n) mod 256
- C: (P * n) mod 256
- D: (P / n) mod 256
View Answer
B
Q475: The encryption program uses which Windows API function to open the input file?
- A: CreateFile
- B: OpenFile
- C: ReadFile
- D: WriteFile
View Answer
A
Q476: Which flag is used in CreateFile to open a file for reading?
- A: GENERIC_WRITE
- B: GENERIC_READ
- C: FILE_ATTRIBUTE_NORMAL
- D: OPEN_EXISTING
View Answer
B
Q477: In the program, the variable bShift stores the _______.
- A: Plain text
- B: Shift amount
- C: Buffer size
- D: Output file handle
View Answer
B
Q478: The buffer array is used to store _______ during encryption.
- A: Input file data
- B: Output file data
- C: Error messages
- D: File names
View Answer
A
Q479: How is each byte of the buffer modified in the encryption loop?
- A: It is multiplied by shift
- B: It is subtracted by shift
- C: It is added by shift
- D: It is XORed with shift
View Answer
C
Q480: Which Windows API function writes encrypted data to the output file?
- A: WriteFile
- B: ReadFile
- C: CreateFile
- D: CloseHandle
View Answer
A