Advertisements
Advertisements
प्रश्न
Differentiate “=” and “==”.
अंतर स्पष्ट करें
Advertisements
उत्तर
- ‘=’ is an assignment operator which is used to assign a value to a variable that is on the left-hand side of an assignment statement.
- ‘=’ operator copies the value at the right side
of the operator to the left side variable. Ex. num = 10; means 10 assign to the variable num. - ‘= =’ is a relational operator. It is used to compare both operands are the same or not.
- Ex. num = = 10 means it compare num value with 10 and returns true(l) if both are same or returns false(0).
shaalaa.com
Lexical Units (Tokens)
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
APPEARS IN
संबंधित प्रश्न
Which of the following is a valid string literal?
What are keywords?
Can keywords be used as identifiers?
The following constant is of which type?
0XCAFE
Write the following real constant into the exponent form:
23.197
Write the following real constant into the exponent form:
7.214
Write the following real constant into the exponent form:
0.00005
Consider the following C++ statement. Are they equivalent?
char ch = 67;
char ch = ‘C’;
What is the difference between 56L and 56?
What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.
