Advertisement
MeehoweCK

Untitled

May 1st, 2023
830
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int funkcja(int* a)
  6. {
  7.     cout << *a << endl;                  // 2. 10
  8.     ++(*a);
  9.     cout << *a << endl;                  // 3. 11
  10.     return *a;
  11. }
  12.  
  13. int main()
  14. {
  15.     int* wskaznik = new int;
  16.     *wskaznik = 10;
  17.  
  18.     cout << funkcja(wskaznik) << endl;
  19.  
  20.     cout << *wskaznik << endl;
  21.     cout << wskaznik << endl;
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement