What is the difference between = and == in C?
Answer Posted / sagar pce
1.> = is an Assignment operator
whereas == is an Comparision or Equality operator
2.> If we go for the = operator the value will be same for
both side i.e; X=Y
for eg. if X=7 then Y=7
but when we go for the == operator the value will show the
result as a true or false
for eg. if X==7 and Y==7
then it return TRUE
Is This Answer Correct ? | 13 Yes | 3 No |
Post New Answer View All Answers
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
What are static variables?
Explain selection sorting. Also write an example.
When does a 'this' pointer get created?
Write about c++ storage classes?
Will a catch statement catch a derived exception if it is looking for the base class?
Write bites in Turbo c++ Header ("Include") Files.
What is the insertion operator and what does it do?
What is an accessor in c++?
What is a catch statement?
Do we have to use initialization list in spite of the assignment in constructors?
Is set c++?
How do I run c++?
Is dev c++ free?
What is an undefined behavior and sequence points