Computer Science, asked by elissablah27, 10 months ago

What willbe the outputfor the
following code x=++a + b+c--
where a = 100, b=40c = 40

Answers

Answered by bipinbatham11
0

Answer:

x=++a + b+c--

Output of this program is 181.

Explanation:

a = 100, b=40c = 40

X=101+40+40 = 181

Here ++a is pre increment operator it will first increment than add with b

C-- is a post decreement operator so first add then decreement apply

Note: In c language +,_,++,-- operators Associativity by default is right side to left.

I hope you get your answer please like my answer .

Similar questions