Can math operations be performed on a void pointer? Ans. No. Pointer addition and subtraction are based on advancing the pointer by a number of elements. By definition, if you have a void pointer, you don't know what it's pointing to, so you don't know the size of what it's pointing to. If you want pointer arithmetic to work on raw addresses, use character pointers. - Study24x7
Social learning Network
10 Apr 2023 05:37 PM study24x7 study24x7

Can math operations be performed on a void pointer? Ans. No. Pointer addition and subtraction are based on advancing the pointer by a number of elements. By definition, if you have a void pointer, you don't know what it's pointing to, so you don't know the size of what it's poin...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles