Computer >> Computer tutorials >  >> Programming >> C programming

An Uncommon representation of array elements in C/C++


This is a simple C++ program of an uncommon representation of array elements.

#include<iostream>
using namespace std;
int main() {
   int array[5] = {7,7,7, 6, 6};
   for (int i = 0; i < 5; i++)
      cout<<*(array+i);
   return 0;
}

Output

7 7 7 6 6