hey..
wats d diff b/w = and == in c++??
as i was told = assigns the values ..
and == cheks it ..
does == does nt assigns the value??
1 2 3 4
|
int a = 0; //a is now 0
a == 0; //returns true because a is 0
a == 2; //returns false because 0 doesn't equal 2
//a is still 0
|
Last edited on
you mean to say dt a == 0 is only cheaking nt assignment??
m i rite??