Tuesday, 8 May 2018

Rules to declare a valid variable

List out the rules to declare a valid variable in ‘C’ program. Evaluate the following expression and show the hierarchy of operations:
( 2 + 4 ) / 3 + 2%3 * 2 – 5

Solution : 

Read List out the rules to declare a valid variable 

Expression Solve Steps

  • (2+4)/3+2%3*2-5
  • 6/3+2%3*2-5
  • 2+2%3*2-5
  • 2+2*2-5
  • 2+4-5
  • 6-5
  • 1