I would like some clarification regarding a point about the storage of register variables:
Is there a way to ensure that if we have declared a register variable in our code,
Here you can use volatile register int i = 10 in C++ to ensure i to be stored in register. volatile keyword will not allow the compiler to optimize the variable i.