Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
73
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 main()
  6. {
  7.     int liczba = 150;
  8.  
  9.     int *wskaznik = 0;
  10.     int *wskaznik2 = 0;
  11.  
  12.     wskaznik = &liczba;
  13.     wskaznik2 = wskaznik;
  14.  
  15.     cout << "adres zmiennej=" << &liczba << "adres wskaznika=" << wskaznik << endl;
  16.  
  17.     cout << *wskaznik << endl;
  18.  
  19.     *wskaznik += 1;
  20.     *wskaznik += 2;
  21.     liczba += 2;
  22.     cout << liczba << endl;
  23.    
  24.     system("pause");
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement