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


Please Help Members By Posting Answers For Below Questions

When can I use a forward declaration?

618


What are the various arithmetic operators in c++?

569


What is a forward referencing and when should it be used?

573


Specify different types of decision control statements?

351


Why do we use templates?

593






Explain the concept of friend function in c++?

597


What is c++ in english?

570


What is void pointer in c++ with example?

590


What is abstraction in c++?

672


What is decltype c++?

553


What is difference between c++ and c ++ 14?

568


What is a dynamic binding in c++?

524


What is setiosflags c++?

526


What is expression parser in c++

1884


Do you know the use of vtable?

627