1 
   2 #include <iostream>
   3 using namespace std;
   4 
   5 #define DIMENSION 10
   6 
   7 void remplitA(int A[],size_t s) {
   8         for (int i=0; i<s;i++) {
   9                 A[i] = i;
  10         };
  11 };
  12 
  13 void impA(int A[],size_t s) {
  14         for (int i=0; i<s; i++) {
  15         cout << "A[" << i << "] = " << A[i] << "\n";
  16         };
  17         cout <<  "\n";
  18 }
  19 
  20 main() {
  21         int A[DIMENSION];
  22         remplitA(A,DIMENSION);
  23         impA(A,DIMENSION);
  24         
  25         int &b = A[5];
  26         b++;  
  27         impA(A,DIMENSION);
  28         
  29         int * c= A+7;
  30         (*c)++;
  31         *c++, (*c)++;
  32         impA(A,DIMENSION);
  33         
  34         cout << "b = " << b << " adr de b = " << &b << "\n";
  35         cout << "c = " << c << " adr de c = " << &c << " val de *c = " << *c << "\n";
  36 }
  37