Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between = and == in C?

Answer Posted / chandan

= Assignment Operator
== Comparision Operator

One Intresting Difference between these two is in the =
operator the left side can not be a const, while in == we
can place Const in either side.
eg. x = 5 //correct
5 = x // Incorrect

but X == 5 // CORRECT
5 == X // Correct and Preffered to use left value
as constant to avoid the unwanted bug.

Is This Answer Correct ?    46 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know the use of vtable?

1186


What do you mean by const correctness?

1135


Distinguish between new and malloc and delete and free().

1073


Who made c++?

1133


What are the types of array in c++?

1228


What is setf in c++?

1152


Write about an iterator class?

1130


what are the decision making statements in C++? Explain if statement with an example?

1144


Difference between delete and free.

1135


How const int *ourpointer differs from int const *ourpointer?

1186


What are stacks? Give an example where they are useful.

1122


How many namespaces are there in c++?

1122


Explain function overloading and operator overloading.

1120


What are pointer-to-members? Explain.

1222


How to declare a pointer to an array of integers?

1185