C Tutorial/Data Type/Register variable
Register variable
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