Examveda
Examveda

Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?

A. 450

B. 10

C. 110

D. -10

E. -110

Answer: Option B

Solution(By Examveda Team)

As the expression is evaluated from right to left.


This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Comments ( 2 )

  1. Sanath Kumar
    Sanath Kumar :
    6 years ago

    = is the assignment operator and evaluates from right to left
    c = c*5 =100
    b = b-c =110-100 =10
    a =b =10

  2. Eth Enock
    Eth Enock :
    7 years ago

    yes c*5=20*5=100 and the question now becomes a=b-=c=100;
    b=b-c=110-100=10 and the question now becomes a=b=10;

    the answer to this question starts by evaluating from right to left.

Related Questions on Operators and Expressions