Computer Architecture & Assembly Language MCQs with Answers

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

Multiple Choice Questions

Q371: What happens when optimizations are turned on in the gcc compiler?
  • A: Fewer instructions are generated
  • B: More instructions are generated
  • C: Assembly code becomes slower
  • D: Memory accesses increase
View Answer
A

Q372: How does the assembly function _swap differ when compiled with optimizations versus without?
  • A: Uses fewer instructions
  • B: Uses more instructions
  • C: Performs the same number of memory accesses
  • D: Uses more registers
View Answer
A

Q373: In the optimized version of the _swap function, which register is used to temporarily store a value?
  • A: EAX
  • B: EBX
  • C: ECX
  • D: ESI
View Answer
B

Q374: Which function should be implemented in assembly to traverse a linked list and call a C function for each node?
  • A: swap
  • B: printnode
  • C: printlist
  • D: traverse
View Answer
C

Q375: What is the role of the ret instruction in an assembly function?
  • A: Initializes the stack
  • B: Returns from the function
  • C: Calls another function
  • D: Exits the program
View Answer
B

Q376: How can a hand-optimized assembly version of a function improve performance?
  • A: By reducing the number of instructions
  • B: By adding more memory accesses
  • C: By increasing the size of the code
  • D: By adding more loops
View Answer
A

Q377: Which processors are popular in high-performance embedded applications?
  • A: Intel x86
  • B: Sun SPARC
  • C: Motorolla 68K
  • D: AMD Ryzen
View Answer
C

Q378: What type of architecture does the Motorolla 68K processor have?
  • A: 32-bit architecture
  • B: 16-bit architecture
  • C: 64-bit architecture
  • D: 23-bit architecture
View Answer
A

Q379: What is the size of the condition code register (CCR) in Motorolla 68K processors?
  • A: 8-bit
  • B: 16-bit
  • C: 32-bit
  • D: 64-bit
View Answer
A

Q380: How many general-purpose registers does the Motorolla 68K processor have?
  • A: 8
  • B: 12
  • C: 16
  • D: 32
View Answer
C

Test Your Knowledge

Take a timed quiz on Computer Architecture & Assembly Language

🚀 Start Quiz Now