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 :

[box]Value at operator is denoted by ‘*’.[/box]
In C Star(*) operator is used for two purposes –

  • Multiplication
  • In Pointer for De-referencing

Some important points about De-Reference Operator :

  1. Value at Operator (*) is unary operator when use in pointer.
  2. Multiplication Operator (*) is binary operator when used for multiplication.
  3. Value at operator ‘*’ in pointer concept is also called as “De-reference” Operator Or “Value at Operator

Precedence of ‘ * ‘ and ‘ & ‘ Operator

  1. Both are Unary Operators
  2. They have Equal Precedence
  3. 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).