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
purpose of abstraction and interface
what is the BAM? where we can use it in BizTalk server?
In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?
Difference between views and index in sas programming
what are all the validation we need to perform in data stage?
how to check single or double byte in struts
Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance
Write a program to find duplicate number from array in minimum time complexity.
through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?
What are the Short cut Keys of Tally ERP?
Why did you ever become involved in QA/testing?
pleasew define carrier scope in abap (sap).
Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe
how to stop execution of step 3 in a job mainframe
how to add a new table with variables and thier values into a imported file uisng proc import?