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
संबंधित प्रश्न
What are keywords?
The following constant is of which type?
39
The following constant is of which type?
0XCAFE
Write the following real constant into the exponent form:
0.319
Assume n = 10; what will be result of n++ and --n;?
Describe the differences between keywords and identifiers?
Is C++ case sensitive? What is meant by the term “case sensitive”?
Write a short note on the const keyword with an example.
Determine which of the following are valid constant? And specify their type.
‘Name’
What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.
