Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int a = 4;
- double b;
- bool ok[10];
- int arr[10] = {0,1,2,3,4,5,6,7,8,9};
- struct point
- {
- float x;
- float y;
- };
- point A;
- cout << sizeof(a) << endl;
- cout << &a << endl;
- cout << sizeof(b) << endl;
- cout << &b << endl;
- cout << sizeof(ok) << endl;
- cout << &ok << endl;
- cout << sizeof(arr) << endl;
- cout << &arr << endl;
- cout << sizeof(A) << endl;
- cout << &A << endl;\
- cout << &A.x << endl;
- cout << &A.y << endl;
- int d = 3;
- int *ptr_d = NULL; //wskaznik
- ptr_d = &d;
- cout << *ptr_d << endl;
- d += 1;
- cout << *ptr_d << endl;
- cout << *ptr_d + 1 << endl;
- cout << *(ptr_d + 1) << endl;
- cout << *(ptr_d - 1) << endl;
- cout << *arr << endl;
- for (int i=0; i<10; i++)
- cout << *(arr + i) << endl;
- cout << "SuPeR FaJnA LeKcJyJkA" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement