Computer Science, asked by prosnehal7, 2 months ago

int z = 10,
M=( 5* + + z) % 4;​

Answers

Answered by pnvkhemka
1

Answer:

z = 10

so M = ( 5 * ++ z ) % 4;

There can't be two pluses like that, if it is then there can't be any other value so I will consider 1 +, but there cant be plus there after * operator so I wont count the Plus.

M = ( 5 *  z) %4

Bracket First

M = 50 % 4

M = 2

Answered by BrainlyProgrammer
2

Answer:

Initially, z=10

M=(5* ++z) %4

=( 5* 11 ) *4

= 55%4

=3

Remember that ++z is prefix so that's why z becomes 11.

Correct answer:-

  • 3

\dag\tt{\large{\bold{Note}:\begin{cases}\sf{ ++x\:and\:--x\:are\:prefix\:increment/decrement\:operator}\\\sf{x++\:and\:x--\:are\:postfix\:increment/decrement\:operator}\\\sf{Postfix\:operator\:increases\:its\:value\:after\:moving\:forward}\\\sf{Prefix\:operator\:increases\:its\:value\:before\:moving\:forward}\end{cases}}}

Similar questions