How to swap values between two variables without using a
third variable?
Answer Posted / shobha
my answer is very correct compared to the others.(1 to 3)
in answer 1 pinky declared a variable(ia) that is never
used in the program and used a variable(a) that is not
declared.finally pinky did not close main function i.e }
in answer 2 Banti Sharma has written the logic of the
program like a program, but he did not wrote the actual
program,if it is a program then the output is nothing,
because there is no statement present for displaying the
values of a and b
in answer 3 Mona also written the logic of the program like
Banti Sharma but Mona wrote it in a method.and mona never
called that method and from where mona is passing values to
var1 and var2.and mona did not displayed the result.
but in answer 4, that means in my answer,
i did not write the entire program,i just explained the
logic how u can swap without the third variable.
i have taken two variables and assigned sample values
(x=10,y=20) to them and explained each and every line with
that sample values, such that the person who asked this
question can write a program of his own.
Banti Sharma, i think u are not trying to answer the
questions but u are trying to point out the silly mistakes
in answers posted by others.
| Is This Answer Correct ? | 10 Yes | 11 No |
Post New Answer View All Answers
please any one pass file aid,xpeditor and endeavor tools
When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.
Need provab technical test questions
what is programmable BIST in today ic design
What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?
Can i please VHDL code for 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;
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
hai i am prasanna.I am MCA 2009 fresher.tell me about certifications.which certification helps me to improve my carrier and to get a technically oriented job ,which certification helps to get job faster.
Find out the list of authorization objects which contains activity as a field? Thanks in advance.
Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com
why we use abstract word in abstract window toolkit in java language.
< No Frames > tag is used for
we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/
code for connection from windows forms to sql server
i am exeprienced person what is selection process