+ 2

Assignment Operators. Explain me this chapter. Pleaseeeeeeeee. , 🙇🙇🙇🙇🙇

https://www.sololearn.com/learn/CPlusPlus/1610/

8th Sep 2018, 9:59 AM
Mr. Nothing
Mr. Nothing - avatar
6 Answers
+ 5
Yeah int a = 50; int b = a; Here, '=' sets the value of right side to variable on left side. '=' sets the value 50 to variable 'a' and '=' also sets the value of variable 'a' to variable 'b'. The value of variable 'b' is 50. Did you understand ?
8th Sep 2018, 10:06 AM
Googel
Googel - avatar
+ 3
Can you be more specific about what you don't understand? This chapter is very much step by step and clear... You have same variable x, this holds some value e.g. 3 and you want to add 2, then you can do x = x+2 (as x holds three, it's the same as x = 5 and the = assignes this value to x so that it holds 5 now) Short form of this is x += 2 Very basic stuff
8th Sep 2018, 10:04 AM
Matthias
Matthias - avatar
+ 2
Supriya Gangapatnam Nice Explanation. Thanks.
8th Sep 2018, 12:01 PM
Mr. Nothing
Mr. Nothing - avatar
9th Sep 2018, 5:58 AM
Amit Haldiya
Amit Haldiya - avatar