Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Please help with an interview question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mike Wahler, post: 1527425"] It doesn't point to anything at all. It's not a pointer, it's an array. An array is not a pointer. A pointer is not an array. You will get a diagnostic from a conforming compiler. Neither should compile at all. So those answers don't really mean anything. That's not a pointer to an array, but a pointer to a (single) type 'int' object. A pointer to the above array would be defined as: int (*p)[100]; As defined by you above (int *ptr), it points to a memory address whose value is sizeof(int) bytes greater than the address it previously stored (before the increment). It appears to me that the interviewer doesn't know C++ (which is very common in my experience). -Mike [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Please help with an interview question
Top