35657

Untitled

Dec 23rd, 2023
622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main() {
  9.  
  10.     const int size = 10;
  11.    
  12.     int arr[size];
  13.  
  14.     for (int i = 0; i < size; i++) {
  15.         *(arr + i) = rand();
  16.         cout << *(arr + i) << " ";
  17.     }
  18.     cout << endl;
  19.  
  20.     cout << *arr << " " << *(arr + 4) << endl;
  21.     //cout << arr << endl;
  22.  
  23.    
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment