# What is difference between val=3 and val==3.

**Q5. Given the two following expressions:**

**a.val = 3**

**b. val==3**

**How are these two different?****What will be the result of the two if the value of val is 5 initially?**

**Ans.(1). **The expressions (a.) is an assignment expression and the expression (b.) is a relational expression that tests for equality.

**Ans.(2). **The result of (a.) will be val having value 3 that is, 3 ** **and the result of (b.) will be 0 (false) because 5 is not equal to 3.