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
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?
Explain the operation of a 6T-SRAM cell?
Draw a transistor level two input NAND gate. Explain its sizing (a) considering Vth (b) for equal rise and fall times
If not into production, how far did you follow the design and why did not you see it into production?
Are you familiar with the term MESI?
What transistor level design tools are you proficient with? What types of designs were they used on?
How to improve these parameters? (Cascode topology, use long channel transistors)
Process technology? What package was used and how did you model the package/system? What parasitic effects were considered?
In vlsi chip 1000s of transistors are dropped, specifically categorized. Which method is used to achieve this & how it is done practically?
Implement a function with both ratioed and domino logic and merits and demerits of each logic?
What is the main function of metastability in vsdl?
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
What is Body Effect?
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?
What is the function of tie-high and tie-low cells?