what is the use of register variable in c? when to use register storage specifier?
for more frequently used variables, like ones used in loops.
variables which takes less memory can be always stored in registers.
int pointers its better to use registers.
both option 1 and 2 are correct.
we have to use register keyword for more frequently used variables, like ones used in loops. So that fetching the value of that variables will not take much time, because they are not stored in the memory, but in the registers.
Back To Top