Name: Anonymous 2011-09-25 10:47
How exactly do register variables work in C? When should they be used? K&R touches upon them briefly but moves right along. Is there any source in which I can read about them in depth?
register
. You will only limit your possibilities doing so (de/referencing). Most modern compilers will optimize your program so that you wouldn't really spot performance differences anyway. Also, I am aware of some compilers/parsers that will ignore this keyword fully.void emptyvar;
int emptyarray[0];
printf("A = %d, B = %d\n", emptyvar, emptyarray[0]);