Topic : Poiners and Arrays in C++
Author : GHA
Page : << Previous 2  
Go to page :


  
    ...
   sum1 = addElements(a, 80);      // sum1 = a[0] + ... + a[79]
   sum2 = addElements(a + 80, 20);   // sum2 = a[80] + ... + a[99]
   // or, equally acceptable,
   // sum2 = addElements(&a[80], 20);


Page : << Previous 2