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
What are the Factors affecting Power Consumption on a chip?
Explain the working of Insights of an inverter ?
For an AND-OR implementation of a two input Mux, how do you test for Stuck-At-0 and Stuck-At-1 faults at the internal nodes? (You can expect a circuit with some redundant logic)
Give the cross-sectional diagram of the cmos.
Help with VHDL programming. Write a VHDL code for a D-Latch with clear input ?? (Hint: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs AND OUTPUTS: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;
Draw the stick diagram of a NOR gate. Optimize it
Explain what is slack?
What is the critical path in a SRAM?
what is verilog?
Explain the operation considering a two processor computer system with a cache for each processor.
Explain why present VLSI circuits use MOSFETs instead of BJTs?
Explain about 6-T XOR gate?
Process technology? What package was used and how did you model the package/system? What parasitic effects were considered?
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
what are three regions of operation of MOSFET and how are they used?