+ 3
what is the operation of num2 =+ num1?
as if we write num2 += num1 then operation performed is // num2 = num2 + num1.... so what happens when we use =+ operator?
16 Answers
+ 3
=+ is wrong
This operand is not exist
+= is true
+ 1
Doesn't give an error, basically it treats the operation like the + doesn't exist.
For people saying error, try it for yourself before you comment. There isn't an error. You shouldn't be writing your code as =+, but if you do, it'll be treated as just =.
+ 1
it's not giving an error, I never said about error but instead when I print num2 with =+ operation, it shows the value of num1. so was just curious what exactly happens with using =+ operation
+ 1
some are confusing perhaps with num2 +=num1
wich is just num2=num2+num1
0
As I said. If you use =+ you're saying =. The + is ignored. It literally does nothing else
0
thanks James.....your answer helped and was satisfactory
0
Doesn't give an error, basically it treats the operation like the + doesn't exist.
For people saying error, try it for yourself before you comment. There isn't an error. You shouldn't be writing your code as +=, but if you do, it'll be treated as just =.
0
+=
0
Type in the missing operator to add the value of num2 to num1:
int num1 = 8;
int num2 = 42;
num1 num2;
The answer is +=
0
Type in the missing operator to add the value of num2 to num1:
int num1 = 8;
int num2 = 42;
num1
num2;
- 1
error
- 1
it's num2=num2+num1 ! Answer to above asked question !
- 2
its gives an operator error.
- 2
it should be num2=num1++
- 2
Excuse me kabir, there is nothing like =+ existing for Java or C++ as per my study.
- 2
I