What is the difference between = and == in C?
Answer Posted / anita sachdeva
= operator in C language is used to assign the value of
right-hand side value/variable/expression to the left hand
side variable.
== operator in C/C++ language is used to check the value of
left hand variable/expression with the right hand
variable/expression. whether the two values are equal or
not. It returns true if these are equal else it will return
false.
| Is This Answer Correct ? | 312 Yes | 21 No |
Post New Answer View All Answers
What is meant by iomanip in c++?
What is the benefit of learning c++?
Do the names of parameters have to agree in the prototype, definition, and call to the function?
What would happen on forgetting [], while deallocating an array through new?
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
Explain the concept of memory leak?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
What is the exit function in c++?
When there is a global variable and local variable with the same name, how will you access the global variable?
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
Do class declarations end with a semicolon?
What is the outcome of cout< a) 16 b) 17 c) 16.5
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
What causes a runtime error c++?
Explain about Garbage Collector?