Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void foo(int arr2[5], int* x2_ptr) {
- x2_ptr = &arr2[4];
- cout << *x2_ptr << endl;
- return;
- }
- int main() {
- int arr[] = {1, 2, 3, 4, 5};
- int x = 9;
- int* x_ptr = &x;
- foo(arr, x_ptr);
- cout << *x_ptr << endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment