+ 1
what is the use of ==
4 Answers
+ 3
== is the equality operator,i.e., it is a relational operator.
It checks whether the value assigned to the variable is the value you are thinking or not.
For eg.
int a =2;
if (a==8)
cout<<"The value is 8";
else
cout<<"the value is not 8";
Hope it is useful.
+ 1
== is the equality operator in C++ language. for example: we give 5 to a and b. so we can write a==b.
(a=5;
b=5;
a==b;)
+ 1
==is the equality operator
for example
{int a;
cout<<"enter any number";
cin>>a;
if(a==0)
cout<<"the value is zero";
else
cout<<"the value is not zero";
}
+ 1
it is used to compare the values of two variables or variable and constant