C precedence of * and & operator
In the previous chapter we have learn about the invalid pointer operations. In this chapter we will learn about Precedence of Address Operator and Value at Operator in C Programming.
Precedence of Value at Operator :
Value at operator is denoted by ‘*’.
In C Star(*) operator is used for two purposes -
- Multiplication
- In Pointer for De-referencing
Some important points about De-Reference Operator :
- Value at Operator (*) is unary operator when use in pointer.
- Multiplication Operator (*) is binary operator when used for multiplication.
- Value at operator ‘*’ in pointer concept is also called as “De-reference” Operator Or “Value at Operator“
Precedence of ‘ * ‘ and ‘ & ‘ Operator
- Both are Unary Operators
- They have Equal Precedence
- They Associate from Right -> Left
Refer the Precedence and Associtivity Table of Operators
In the next chapter we will be learning the meaning of (++*ptr) and meaning og (*++ptr).