0 votes
in C Plus Plus by
What is the difference between equal to (==) and Assignment Operator (=)?

1 Answer

0 votes
by

Answer: In C++, equal to (==) and assignment operator (=) are two completely different operators.

Equal to (==) is an equality relational operator that evaluates two expressions to see if they are equal and returns true if they are equal and false if they are not.

The assignment operator (=) is used to assign a value to a variable. Hence, we can have a complex assignment operation inside the equality relational operator for evaluation.

Related questions

0 votes
asked Dec 1, 2022 in JavaScript by john ganales
0 votes
asked Nov 13, 2021 in SQLite by sharadyadav1986
...