Computer Science, asked by chandankr11189, 1 month ago

a++ + ++b%a-- + a if a=15 and b=6​

Answers

Answered by BrainlyProgrammer
5

To solve:-

  • a++ + ++b%a-- + a

Given:-

  • a=15
  • b=6

a++ + ++b% a-- + a

15 + 7%16 +15

15+ 7 +15

37

Required Answer:-

  • 37

Always Remember!

  • Prefix Operators :- They increase/decrease their value before moving forward. ++x,--x are prefix increment/decrement operator .
  • Postfix Operators :- They increase/decrease their value after moving forward. ++x,--x are prefix increment/decrement operator .

Operator Precedence

\boxed{ \begin{array}{c|c}\tt  \underline{Operators}:&\tt\underline{Hierarchy}:\\ \tt( \: ),[ \: ]&\tt1\\ ++,--,\sim,!& \tt2\\ \tt *,/,\%&\tt3\\ +,-&\tt4 \\ \tt >>,>>>,<<&\tt5\\ \tt >,>=,<,<=&\tt6\\ \tt ==,!= &\tt7\\  \& &\tt8\\ \tt ^{\wedge}&\tt9\\ \tt !&\tt10\\ \tt\&\& & \tt11 \\ \tt ||&\tt12\\ \tt ?=&\tt13\\ \tt =&\tt14 \end{array}}

Similar questions