engineering computer science MCQ #2149

What is the purpose of `register` keyword?

engineering computer science MCQ #2149

  1. Question 1

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

    • A) To declare a global variable
    • B) To hint the compiler to store a variable in a register
    • C) To make a variable constant
    • D) To declare a function

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

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