Previous Next Up Index Contents

Exercice 3.5

Evaluer les expressions suivantes en supposant

A=20 B=5 C=-10 D=2 X=12 Y=15

(1)

(5*X)+2*((3*B)+4)
-> 98
/
(2)
(5*(X+2)*3)*(B+4)
-> 1890
/
(3)
A == (B=5)
-> 0
B=5
(4)
A += (X+5)
-> 37
A=37
(5)
A != (C *= (-D))
-> 0
C=20
(6)
A *= C+(X-D)
-> 0
A=0
(7)
A %= D++
-> 0
D=3 A=0
(8)
A %= ++D
-> 2
D=3 A=2
(9)
(X++)*(A+C)
-> 120
X=13
(10)
A = X*(B<C)+Y*!(B<C)
-> 0+15 = 15
A=15
(11)
!(X-D+C)||D
-> !0||1 = 1
/
(12)
A&&B||!0&&C&&!D
-> 1||1&&1&&0 = 1
/
(13)
((A&&B)||(!0&&C))&&!D
-> (1||1)&&0 = 0
/
(14)
((A&&B)||!0)&&(C&&(!D))
-> (1||1)&&(1&&0) = 0
/


Previous Next Up Index Contents


Feedback - Copyright © 1993,1996,1997 F.Faber