How to swap values between two variables without using a
third variable?
Answer Posted / sriram
Hey guys, what about swaping variables contains string
values? All of your solutions will suck... Try this and swap
any datatype without third variable... Happy Sensible Coding..
$v = 'sriram';
$u = 'lakshmi';
$v .= $u;
$u = substr($v,0,(strlen($v) - strlen($u)));
$v = substr($v,(strlen($v) - strlen($u)-1), strlen($v));
echo 'u = ' . $u .'<br>';
echo 'v = ' . $v;
Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
Given a set. Write the pseudo code to get all the subsets for the given set. Eg. Input : {1,2} Output : (),(1),(2),(1,2)
what is an INI file?
what is log files in qtp what is use
What is the difference between WebIntelligence and Designer in creating universes?
when we use mantis? how learn mantis?
How to merge Action Form with Dyna Action Form in Struts.
In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?
Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?
Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in
WHAT IS MAIN IMPORTANT THING IN SOFTWARE?
I am taking the bmc control m/enterprise manager 7.0 scheduling test and just wanted to see what kind of questions they would ask or if anyone has taken the test and how long it is for how many questions?
In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?
What sysoption determines where the macro facility searches a specific catalog for complied macro?
What is BASIS
What is autocall macro and how to create autocall macro? what is the use of it?