View Single Post
Join Date: Nov 2008
Posts: 81
Reputation: minas1 is an unknown quantity at this point 
Solved Threads: 8
minas1's Avatar
minas1 minas1 is offline Offline
Junior Poster in Training

array indexing vs pointer arithmetic

 
0
  #1
Nov 9th, 2008
  1. int x[5];
  2. x[4] = 10;
  3. *(x + 4) = 10;

Array indexing has a cleaner syntax but (as I've read) pointer arithmetic is faster. My question is, is it worth to use pointer arithmetic? Is there a noticeable difference?
Last edited by minas1; Nov 9th, 2008 at 7:55 am.
Reply With Quote