Register variable : Register variable « Data Type « C Tutorial






Register variable is for faster access.

Register variable cannot be global variables.

#include <stdio.h>

main()
{
    register int i = 0;   

    for( i=0;i<2;i++)
    {
        printf("value of i is %d\n",i);
    }
}
value of i is 0
      value of i is 1








2.30.Register variable
2.30.1.Register variable