Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I want to use a char * pointer to step over some ints. Why doesn “((int *)p)++;” work?

char ints pointer step
0
Posted

I want to use a char * pointer to step over some ints. Why doesn “((int *)p)++;” work?

0

In C, a cast operator is a conversion operator, and by definition it yields an rvalue, which cannot be assigned to, or incremented with ++.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.