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

Updated on: 30-Jul-2019

69 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements