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

In the design of a large inverter, why do we prefer to connect small transistors in parallel (thus increasing effective width) rather than lay out one transistor with large width?

1126


Explain the operation of a 6T-SRAM cell?

4468


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

1586


If not into production, how far did you follow the design and why did not you see it into production?

2049


Are you familiar with the term MESI?

2637


What transistor level design tools are you proficient with? What types of designs were they used on?

3386


How to improve these parameters? (Cascode topology, use long channel transistors)

2130


Process technology? What package was used and how did you model the package/system? What parasitic effects were considered?

3073


In vlsi chip 1000s of transistors are dropped, specifically categorized. Which method is used to achieve this & how it is done practically?

971


Implement a function with both ratioed and domino logic and merits and demerits of each logic?

3728


What is the main function of metastability in vsdl?

1003


For a NMOS transistor acting as a pass transistor, say the gate is connected to VDD, give the output for a square pulse input going from 0 to VDD

1388


What is Body Effect?

2463


You have a driver that drives a long signal & connects to an input device. At the input device there is either overshoot, undershoot or signal threshold violations, what can be done to correct this problem?

2623


What is the function of tie-high and tie-low cells?

1030