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

Can a program run without main in c++?

1213


Do you know what is overriding?

1211


How the endl and setw manipulator works?

1017


Is java easier than c++?

1032


What do you mean by stack unwinding in c++?

1233


How do I exit turbo c++?

1076


What is the precedence when there is a global variable and a local variable in the program with the same name?

1132


How do I download c++?

1007


What is the size of integer variable?

1066


Where can I run c++ program?

1068


Explain rtti.

1087


What does int * mean in c++?

1231


Define namespace in c++?

1054


Difference between class and structure.

1178


Is there any function that can skip certain number of characters present in the input stream?

1070