A CDE Definition
The symbol for "is equal to" in C/C++. For example, IF (PAYMENT==300) is an "if" statement in C/C++ that asks whether the contents of the variable PAYMENT is equal to 300. This symbol pair causes novices and even experienced programmers a huge amount of frustration because most other languages use a single "=" sign for equality comparison. See equals sign.
In programming, the equals sign (=) is used for equality and copying. For example, if x = 0 means "if X is equal to zero;" however x = 0 means "copy the value zero into the variable X." Double equals signs (==) means equals to in C. For example, if (x == 0) means if X is equal to zero. The unusual use of the double equals sign causes many errors in C programming.
Before/After Your Search Term
Terms By Topic
Click any of the following categories for a list of fundamental terms.