What are valid operations on pointers?

1 Answer(s)

This is what isĀ Valid


px
px>=py
px==py
px!=py
px==NULL
px=px+n
px=px-n
px-py

Everything else is invalid (multiplication, division, addition of two pointers)!

Something like


j = j * 2;
k = k / 2;

where j and k are pointers will give this error


Illegal use of pointer in function main

Supporter Answered on August 15, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.