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
Explain the working of Insights of a pass gate ?
Explain how Verilog is different to normal programming language?
Draw Vds-Ids curve for a MOSFET. Now, show how this curve changes with increasing Vgs.
What does the above code synthesize to?
What is Noise Margin? Explain the procedure to determine Noise Margin?
How can you construct both PMOS and NMOS on a single substrate?
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
Draw the Layout of an Inverter?
What is the main function of metastability in vsdl?
what are three regions of operation of MOSFET and how are they used?
Explain the three regions of operation of a mosfet.
What transistor level design tools are you proficient with? What types of designs were they used on?
What are the various regions of operation of mosfet? How are those regions used?
Draw the Cross Section of an Inverter? Clearly show all the connections between M1 and poly, M1 and diffusion layers etc?
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