Does the standard mandate an lvalue-to-rvalue conversion of the pointer variable when applying indirection?

I think you’re approaching this from a rather oblique angle, so to speak. According to ยง5.3.1/1: The unary * operator performs indirection: the expression to which it is applied shall be a pointer to an object type, or a pointer to a function type and the result is an lvalue referring to the object or … Read more

Reference to a pointer

What is the difference between ptr and rptr? If you do char *world = “World”; rptr = world; and then print str, it will print “World”. If you do ptr = world; and then print str, it will print “Hello”.

What does this C statement mean?

To break this down yourself, start from the inner most parentheses and work your way out. (*[10]) <—- Array of 10 pointers (*[10])(int *) <—— Array of 10 pointers to functions which has a pointer to int as its argument (void (*[10])(int *)) <—— Array of 10 pointers to functions which has a pointer to … Read more

Displaying the address of a string

If you use &hello it prints the address of the pointer, not the address of the string. Cast the pointer to a void* to use the correct overload of operator<<. std::cout << “String address = ” << static_cast<void*>(hello) << std::endl;