answersLogoWhite

0


Best Answer

a = b changes the value of a and makes it the same as the value of b.

a == b does not change the values of a or b. It is an expression that is equal to 1 if a and b are the same or to 0 if a and b are different.

For example:

if ( a == b) { c = d;}

means if a and b are the same, then set c equal to d.

C does let you write the following:

if ( a = b) { c = d;}

This sets a equal to the value of b, and then if the new value of a is non-zero, it sets c equal to d. You can do this, but if you see a single equal sign in an "if" condition, that usually (but not always) is a mistake.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between equals equals and equals in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Difference between C and C programming language?

The C and C programming languages are one and the same. There is no difference between those languages.


What is the difference between the Linux shell and C?

C is a programming language. A shell is an interface.


What is difference between Turbo and Borland C?

turbo is word to do the programming language in c & c++ and i do no about borland


What is the difference between aspnet vbnet and c?

asp.net is website programming vb.net is windows forms programming the visual basic language c#.net is windows forms programming in c# language


Difference between c and shell programming execution?

Can you please explain your question?


Is there any difference between turbo c and c plus plus?

turbo c is a compiler and c++ is a programming language.


What is the difference between c plus plus and java programming?

Java doesn't have pointers. C++ has pointers.


What is difference between c and oops?

C is a programming language, oops is what you say when you realize you were wrong in something. Note: Some programming languages are known as object-orient languages, C is not one of them, but some derivatives of it (C++, C#, Java) are.


What is the difference between CA and C plus plus?

CA is an abbreviation for chartered accountant (Ca is the chemical symbol for calcium, which is an element). C++ is a programming language. If you actually meant what is the difference between C and C++ programming languages, then the main difference is that C++ incorporates object-oriented programming whereas C does not. Otherwise both languages are largely the same, insofar as most C programs will compile under C++ with relatively minor modification.


Difference between java and C plus plus?

java is an advanced object oriented programming language than c++


What is the difference between if conditions and if else condtion in computer programming with c?

The lack or presence of the else-part.


What is the difference between visual basic and visual c?

The programming language: Visual Basic is a BASIC-like (or BASIC-derived) language, Visual C is... well C.