#include using namespace std; // Arrays are implicitly passed by reference. // No size is given, but the array is NOT strechy! // You just have to know how big the array is. void foo(int data[]) { data[2] = 666; } int main() { int a[] = {11,22,33,44,55}; foo(a); for (int i=0; i<5; i++) cout << a[i] << ' '; // You have to do it one-by-one cout << '\n'; return 0; }