why declaring a pointer is like declaring a dynamic size array ?
i learned that arrays are that of a fixed sized containers
then why doin this , is valid in c++
1 2 3 4
|
int y =5;
int *x = &y;
x[1] = 54;
cout<<x[0]<<" "<<x[1]<<endl;
| |
It's not valid.
Topic archived. No new replies allowed.