Computer Science, asked by arskgrsd5937, 1 year ago

Which of the below statements is equivalent to $add += $add ?
A.$add = $add
B.$add = $add +$add
C.$add = $add + 1
D.$add = $add + $add + 1

Answers

Answered by choudhary21
13
✔✔{\texttt{Answer}}✔✔
⤵⤵⤵⤵⤵⤵⤵⤵⤵⤵⤵ ıllıllıllıllıllıllııllıllıllıllıllıllııllıllıllıllıllıllı
_______________________

<b>Typing -

$add = $add+$add

because $add += $add

doubles the value of $add and so does $add = $add+$add if initially $add = $add = $add + 1

C.$add = $add + 1✔✔

\huge\boxed{\texttt{\fcolorbox{aqua}{grey}{C}}}

_______________________ ıllıllıllıllıllıllııllıllıllıllıllıllııllıllıllıllıllıllı

<b><big>⭐⭐Hope help You⭐⭐

Answer - By Choudhary21
Answered by Anonymous
1

Option b is the correct answer. Here $add = $add +$add is equivalent to $add += $add

  • += is an addition assignment operator.
  • += operator adds up or concatenate the value or string respectively of the right hand operand to assign a new value or string within the variable.
  • Here, if $add stores numerical value then $add += $add is equivalent to $add = $add +$add or $add = $add + 1 (i.e, option b or c both).
  • If $add stores string then $add += $add is equivalent to $add = $add +$add (only option b).
  • So, as a whole, option b is much more appropriate in this case.

##SPJ3

Similar questions