+ 2

What is the difference between '=' and '==' ?

27th Jun 2016, 6:17 AM
DEATH WALKER
DEATH WALKER - avatar
3 Answers
+ 3
= assign right side value to left side variable == check if both sides are equal (1==2) has a value 0 if (1==2) cout <<"equal"; equal will not be printed but, if (1==1)cout <<"equal"; equal will be printed...
27th Jun 2016, 7:09 AM
Mukul Kumar
Mukul Kumar - avatar
0
= means assignment,== means equals to
27th Jun 2016, 7:05 AM
SHAHID KHAN
SHAHID KHAN - avatar
0
in c++ the "==" sign makes the program checks whether it is equal or not and by using "=" we are stating that it is equal
27th Jun 2016, 7:42 AM
rise of the titan
rise of the titan - avatar