Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- char arr1[1] { 1 };
- char* p1 = arr1;
- int arr2[2]{ 1, 2 };
- int* p2 = arr2;
- cout << sizeof(char) << " " << sizeof(*p1) << " " << sizeof(p1) << endl;
- cout << sizeof(int) << " " << sizeof(*p2) << " " << sizeof(p2);
- system("PAUSE");
- return 0;
- }
- //Компиляция:
- //1 1 4
- //4 4 4
Advertisement
Add Comment
Please, Sign In to add comment