#include using namespace std; void f(int d[],const int sized){ // C++ style, empty [] tells compiler d is array // d is passed by reference! // You are dealing with the original array, not with it's copy. for (int i=0;i