Pointer conversion is a term mostly related to the C and C++ languages, for when a pointer to one type is converted to a pointer of another type.
Pointer conversion is a term mostly related to the C and C++ languages, for when a pointer to one type is converted to a pointer of another type. It could also mean a conversion between pointers with different qualifiers (const
, volatile
etc), conversions to/from void*
or conversions to/from null pointers.
The rules of pointer conversion (C11 6.3.2.3) are slightly different between C and C++. For example, C allows implicit conversions to/from a void pointer and a pointer to another type, while C++ does not allow it. The languages also have different rules for null pointers.
Pointer conversions are also related to function pointers. Function pointers cannot get converted to/from object pointer types, but may in some cases be converted to other function pointer types or to null pointers.
Tag usage:
Any question using pointer-conversion shall also be tagged with the relevant language, likely either c or c++. Since these two languages have different pointer conversion rules, both tags should not be used at once, unless the question is explicitly about the difference in pointer conversion rules between the two languages.