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
write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?
sample code for data transfer between two r/2 systems and r/3 systems?
What is SOLID Principle in Programming Language?
what are the topics choosen for jam round for interviews
hi..this is kartheek..complted mca in 2009..but i dont have knowledge in programing..but to learn new language.. which one is suitable for me?is SAP or IBM mainframes is suitable for me..?if it suits how much will it costs..?pls answer...
could you please tell me how to draw the calibration curve for HPLC {the software which we are using}?
what are resources in case of Threads
Outline the two important features of a terminating recursion. Any ideas?
through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?
when will triggars the at new event in abap and web dybn pro?
what is delegate and delegation model give the real live example on delegate model
What is the merger sort principle and its time complexity.
Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?
in a VB application, where the data will be stored after manipulation? what is the syntax for that?
how do you generate source code for the automatic generation for receipt number