Computer Science, asked by nonetheless, 3 months ago

int p=9, int b=8;

int k= ++ p + b-- + (p%2)*1

Find the value of k​

Answers

Answered by richitha77
0

Answer:

18

Explanation:

k=(++p) +(b--) +(P%2)*1

  • here ++p =10 ( now p value becomes 10)
  • b-- = 8 ( after taking of b value it decrement the value so now b value becomes 7)
  • p%2=10%2=0

k=10+8+0*1

18

Similar questions