Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- // равносильно print(int arr[], int size)
- void print(int* arr, int size) {
- for (int i = 0; i < size; i++) {
- cout << *(arr + i) << " ";
- }
- cout << endl;
- }
- int main() {
- setlocale(LC_ALL, "ru");
- const int size = 5;
- int arr[size]{ 33,45,67,22,38 };
- print(arr, size);
- *(arr + 3) = 128;
- print(arr, size);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement