Skip to main content

Computer Architecture & Assembly Language MCQs with Answers

Practice important Computer Architecture & Assembly Language MCQs with answers and explanations.

Multiple Choice Questions

Q361: In Pascal calling conventions, who is responsible for removing the parameters?
  • A: Caller
  • B: Callee
  • C: Both
  • D: None
View Answer
B

Q362: What naming convention does C use for function or variable names?
  • A: No change
  • B: Prepends an underscore
  • C: Converts to uppercase
  • D: Adds a prefix
View Answer
B

Q363: Which register holds the return value in both C and Pascal calling conventions?
  • A: EBX
  • B: ECX
  • C: EAX
  • D: ESP
View Answer
C

Q364: In C calling conventions, which registers must be preserved?
  • A: EAX, EBX, ESI
  • B: EAX, ESI, EDI
  • C: EBX, ESI, EDI, EBP, ESP, DS, ES, SS
  • D: ECX, EDX, FS, GS
View Answer
C

Q365: How is a function named "divide" called in assembly?
  • A: call divide
  • B: call _divide
  • C: call divide_func
  • D: call _div_func
View Answer
B

Q366: What directive can be used in C++ to enforce C style naming?
  • A: extern "Pascal"
  • B: extern "C"
  • C: extern "Assembly"
  • D: extern "Standard"
View Answer
B

Q367: What does the "extern" directive do in NASM?
  • A: Declares an external symbol
  • B: Declares a local variable
  • C: Declares a global symbol
  • D: Declares a function
View Answer
A

Q368: What command is used to assemble an assembly program into an object file in NASM?
  • A: nasm –f win32
  • B: nasm –o obj
  • C: nasm –c obj
  • D: nasm –f obj
View Answer
A

Q369: In the assembly function _swap, what does the instruction mov ecx,[esp+4] do?
  • A: Copies parameter p1 to ecx
  • B: Copies parameter p2 to ecx
  • C: Copies the return value to ecx
  • D: Copies the address of p1 to ecx
View Answer
A

Q370: What is the purpose of the add esp, 8 instruction in the assembly code calling a C function?
  • A: Allocates stack space
  • B: Clears the stack
  • C: Increments the stack pointer by 8
  • D: Decrements the stack pointer by 8
View Answer
B

Test Your Knowledge

Take a timed quiz on Computer Architecture & Assembly Language

🚀 Start Quiz Now