Advertisement
35657

Untitled

Mar 30th, 2024
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4.  
  5. using namespace std;
  6.  
  7.  
  8.  
  9.  
  10. int main() {
  11.     setlocale(LC_ALL, "ru");
  12.  
  13.     const int size = 5;
  14.  
  15.     int arr[size]{ 33,45,67,22,38 };
  16.  
  17.     for (int i = 0; i < size; i++) {
  18.         cout << *(arr + i) << " ";
  19.     }
  20.     cout << endl;
  21.  
  22.     *(arr + 3) = 128;
  23.  
  24.     for (int i = 0; i < size; i++) {
  25.         cout << *(arr + i) << " ";
  26.     }
  27.     cout << endl;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement