Home  >  Article  >  Backend Development  >  Unconventional representation of array elements in C/C++

Unconventional representation of array elements in C/C++

王林
王林forward
2023-08-26 17:41:191013browse

Unconventional representation of array elements in C/C++

This is a simple C program for unconventional 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

The above is the detailed content of Unconventional representation of array elements in C/C++. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete