Is that possible to add pointers to each other? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Is that possible to add pointers to each other?

Explain this question, the interviewer ask me this question at the time of interview recently.

21st Nov 2019, 5:58 PM
Nitin Tadge
Nitin Tadge - avatar
2 Answers
+ 4
you can only add values to pointer address, to access a particular address, and you can subtract a pointer from another pointer and not addition of 2 pointers
21st Nov 2019, 6:13 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 5
There is no possibility to add pointers together. Since pointer contains address details there is no way to retrieve the value from this operation.
21st Nov 2019, 6:08 PM
Aishwarya Kshirsagar