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
how to data grid use in data bind?
How do you initialize a static member of a class with return value of some function?
How to know we are in home page of a web application using QTP
How to set fixed width in particular
1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?
How will you prove that java swing is multithreaded?
what is the difference between rename and label
Which method protects back button to retrieve old value from previous page in Struts.
how to add Servlet-api.jar file into eclipse 3.3.2 ?
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
1.what is the vesition managment.
What is SAP TAO? · Which Version you are using? · What is the Latest Version in SAP TAO? · What are the Advantages in SAP TAO? · What are the Patches required for SAP TAO? · What is BPT? · Difference between BPT & SAP TAO? · Which Framework using for SAP TAO? · What is CBASE? · What is the SAP TAO Architecture? · What are the Prerequisites for SAP TAO? · SAP Solution Manager Mandatory for SAP TAO 1.0? · SAP Solution Manager Mandatory for SAP TAO 2.X? · What is UI Scanner? · What is Inspector? · How many ways to Create a components using TAO 1.0? · How many ways to Create a components using TAO 2.x? · Which service pack required for SAP TAO 2.7? · What is Import/Export? · What is Consolidate?
what are stubs related to foxpro?
what is the last ant version you worked?how to get it
What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?