JakubKaczmarek_123

zadanie 3

Apr 16th, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int a = 14;
  5. float b = 6.7;
  6. char c = 'x';
  7. int *w_a = &a;
  8. float *w_b = &b;
  9. char *w_c = &c;
  10. int main(){
  11. cout << "a: " << a << endl;
  12. cout << "b: " << b << endl;
  13. cout << "c: " << c << endl;
  14. cout << "adres a: " << (intptr_t)&a << endl;
  15. cout << "adres b: " << (intptr_t)&b << endl;
  16. cout << "adres c: " << (intptr_t)&c << endl;
  17. cout << "wartosc adresu a: " << *w_a << endl;
  18. cout << "wartosc adresu b: " << *w_b << endl;
  19. cout << "wartosc adresu c: " << *w_c << endl;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment