Call Us : +91-8376986802 (Viber, WhatsApp)

What is the purpose of “register” keyword?



It is used to make the computation faster.
The register keyword tells the compiler to store the variable onto the CPU register if space on the register is available. However, this is a very old technique. Todays processors are smart enough to assign the registers themselves and hence using the register keyword can actually slowdown the operations if the usage is incorrect.

Leave a Reply