Try to search your question here, if you can't find : Ask Any Question Now ?

when ever i tried to check the size of pointer variable i.e, int *p sizeof(p) then always give 8 bit. Why?

HomeCategory: stackoverflowwhen ever i tried to check the size of pointer variable i.e, int *p sizeof(p) then always give 8 bit. Why?
Avatarjulie asked 5 days ago

When I declared an integer array of size 10 and check the size it gives 40 but when I declared integer pointer variable with an array of size 10 and I try to check the size it always gives 8. Why?
int A[10];
cout<

int *p;
p = new int[10];
cout<<sizeof(*p)<<endl;  // but it gives always 8;
1 Answers
Best Answer
Avatarnaveen answered 5 days ago
Your Answer

12 + 16 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com