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 the function of enhancement mode transistor?

1176


What is Noise Margin? Explain the procedure to determine Noise Margin?

2509


How does Vbe and Ic change with temperature?

3567


What are the steps required to solve setup and hold violations in vlsi?

1138


In a SRAM layout, which metal layers would you prefer for Word Lines and Bit Lines? Why?

4171


Give a big picture of the entire SRAM Layout showing your placements of SRAM Cells, Row Decoders, Column Decoders, Read Circuit, Write Circuit and Buffers

1156


Give the cross-sectional diagram of the cmos.

1038


Explain Basic Stuff related to Perl?

1093


Cross section of a PMOS transistor?

4816


How can you model a SRAM at RTL Level?

5782


How logical gates are controlled by boolean logic?

1111


Draw a transistor level two input NAND gate. Explain its sizing (a) considering Vth (b) for equal rise and fall times

1711


Explain how MOSFET works?

3290


Explain how binary number can give a signal or convert into a digital signal?

1164


Are you familiar with the term snooping?

3605