engineering computer science MCQ #2127

What is the use of `register` keyword?

engineering computer science MCQ #2127

  1. Question 1

    Q1. What is the use of `register` keyword?

    • A) To allocate memory on the heap
    • B) To suggest the compiler to store a variable in a register
    • C) To declare a global variable
    • D) To define a macro

    Answer: To suggest the compiler to store a variable in a register

    Explanation: Register keyword is a hint to the compiler to store a variable in a CPU register for faster access.