What are register variables?



What are register variables?..

Answer / Suman Nagar

The "register" keyword in C++ is used to request that the compiler to store the variable in a register instead of main memory (RAM). The primary purpose of using register variables is to increase the performance by reducing the number of memory accesses. However, the actual placement of variables in registers is determined by the compiler and not all variables requested as "register" will be stored in the registers because registers are limited in number.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the difference between mutex and binary semaphore?

1 Answers  


Comment on local and global scope of a variable.

1 Answers  


Differentiate between a deep copy and a shallow copy?

1 Answers  


Write a code/algo to find the frequency of each element in an array?

1 Answers   Axtria,


What is c++ library?

1 Answers  


What is buffering in c++?

1 Answers  


What is low level language in simple words?

1 Answers  


What is size of string in c++?

1 Answers  


How do you allocate and deallocate memory in C++?

1 Answers  


Explain rethrowing exceptions with an example?

1 Answers  


why and when we can declar member fuction as a private in the class?

1 Answers  


What are function prototypes?

1 Answers  


Categories