+ 3

Can anyone help me in learning Assignment Operators?

I am confused at right side.

19th Jul 2019, 4:14 PM
Abhishek Bawa
Abhishek Bawa - avatar
7 Respostas
+ 5
As name indicates Assignment operator '=' assigns / copies the right side value to the left side variable. Ex: int a=7, b=5; b=a; Line1. Value of variable a, b have been assigned with value 7, 5 respectively. Line 2. Value of variable b is overwritten by value of a. I. e. Value of b will be 7 as it copies the value of a. Hope this helps..!!!
19th Jul 2019, 5:10 PM
Kuri
Kuri - avatar
+ 2
Still confused
19th Jul 2019, 5:11 PM
Abhishek Bawa
Abhishek Bawa - avatar
+ 2
What is confusing? Give some example, where you had confusion....
19th Jul 2019, 5:57 PM
Kuri
Kuri - avatar
+ 1
Yes What is problem ?
21st Jul 2019, 2:03 AM
wahid nadeem
wahid nadeem - avatar
+ 1
Very easy actually. A value is assigned with this character =
21st Jul 2019, 9:02 AM
biodun
+ 1
Kuri line2 there is an error: should be a b=a thats why Ananya still confused
21st Jul 2019, 10:43 AM
Romanos Spiropulos
+ 1
Just simple to learn assignment operators. Suppose take two values : First one is num1 and the second is num2 . If you wanna add num2 in num1 and want output value as num2 So we can code in two forms both give the same result Num2=num2+num1; Num2 += num1; Hope you understand well.😊
21st Jul 2019, 1:08 PM
Hemant Bhardwaj
Hemant Bhardwaj - avatar