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 / swapna

= is used for assigning the value to a variable
for example
int a=10;
if a=5
printf("%d",a);
else
printf("%d",a);

output:5
in this program a value is assigned to 5 and 5 is printed.

whereas
== is used to check the value of the variable
for example
int a=10;
if a==5
printf("%d",++a);
else
printf("%d",a);

output:10

in this value of a is checked with 10 .If it is equal if
stmt is true and a is incrementd and printed.
If it is not equal a value is printed.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is multiplexer?

1146


How do you size NMOS and PMOS transistors to increase the threshold voltage?

3012


You have three adjacent parallel metal lines. Two out of phase signals pass through the outer two metal lines. Draw the waveforms in the centre metal line due to interference. Now, draw the signals if the signals in outer metal lines are in phase with each other

1556


Explain CMOS Inverter transfer characteristics?

3901


Differences between Array and Booth Multipliers?

4063


Explain what is multiplexer?

1065


Why do we gradually increase the size of inverters in buffer design? Why not give the output of a circuit to one large inverter?

1276


What are the changes that are provided to meet design power targets?

1099


6-T XOR gate?

4223


What types of CMOS memories have you designed? What were their size? Speed?

3130


What types of CMOS memories have you designed? What were their size? Speed?

4643


Explain the working of Insights of an inverter ?

1239


Explain what is the use of defpararm?

1136


Insights of a 4bit adder/Sub Circuit?

3344


Basic Stuff related to Perl?

2802