Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int* arr = new int[256];
- printf("Size of arr: %dn", sizeof(arr));
- int *arr = new int[256];
- int *p = &arr[100];
- printf("Size: %dn", sizeof(p));
- int main()
- {
- std::vector<int> v(256);
- printf("size of v is %i capacity is %in", sizeof(int) * v.size(), sizeof(int) * v.capacity());
- }
- const int arrSize = 256;
- int main()
- {
- int array[arrSize];
- printf("Size of array is %i", sizeof(int) * arrSize);
- }
- string* p = new string[5];
- delete[5] p;
- size_t* p = new size_t[10];
- cout << p[-1] << endl;
- // Or
- cout << p[11] << endl;
- char *ar = new char[100]
Add Comment
Please, Sign In to add comment