Accessing array values via pointer arithmetic vs. subscripting in C
You need to understand the reason behind this claim. Have you ever questioned yourself why it is faster? Let’s compare some code: int i; int a[20]; // Init all values to zero memset(a, 0, sizeof(a)); for (i = 0; i < 20; i++) { printf(“Value of %d is %d\n”, i, a[i]); } They are all … Read more