What is the program code in c++ to get the sum of given n numbers using pointers?
"using pointers" is vague, also there is a seperate programming forum...
if you have a list of length n and some pointer p to the start of that list, of the correct type then:
type sum(type* p, int n)
type sum = 0;
for(int i = 0; i < n; i++) sum += p[i];
is a function that sums the numbers
Thanks for giving an answer to my question.
Separate names with a comma.