Determine value of expressions.

Q20. Suppose A, B, C are integer variables A = 3, B = 3, C = -5 and X, Y, Z are floating point variables where X=8.8, Y = 3.5, Z = -5.2. Determine the value of the following expressions:

  1. A%C
  2. A*B/C
  3. (A*C)%B
  4. X?Y
  5. X?(X+Y)
  6. int(X)%int(Y)

Ans.(1). 3.

Ans.(2). -1.

Ans.(3). 0.

Ans.(4). 2.514286.

Ans.(5). 0.715447.

Ans.(6). 2.

Leave a Reply

Your email address will not be published. Required fields are marked *

422 Views
%d bloggers like this: