How can your reverse a sentence("I LOVE MY COUNTRY" to
"COUNTRY MY LOVE I")
Answers were Sorted based on User's Feedback
Answer / tanmoy saha
<?php
$main = 'I LOVE MY COUNTRY';
$main_arr = explode(' ',$main);
$rev_arr = array_reverse($main_arr);
echo implode(' ',$rev_arr);
?>
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / uday
arr=split(str," ")
for i=ubound(arr-1) to 0 step-1
revstr=arr(i)&" "
next
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / ravi yellasiri
string s = "I LOVE MY COUNTRY";
// reverse string s
// "YRTNUOC YM EVOL I";
s = string.reverse(s);
// Split s with " " delimiter
string[] arr = s.split(" ");
// process till last-1 token
for(int i = 0; i < arr.Length-1; i++)
{
print (arr[i]);
print (" ");
}
// Print the last token...
print (arr[arr.Length-1]);
| Is This Answer Correct ? | 1 Yes | 3 No |
Expain testing proces of your company?
What is the difference between Alpha and Beta Testing?
13 Answers Motorola, Reliance,
what is the difference between reference key and foreign key
what is Ping tests?
what is web application testing and what is the difference between a client server application and web server application?
In real time how Data base testing is done Manually? Mean to ask we write sql queries WHere, If you r using test management tool like HP QC
what is the main difference between Compatibility testing and system testing
u have 1000 of delete button in ur application ,how to check it out,.one by one ? or how to check it out by easy way?
Give me some sertification courses in testing?
What is Configuration management? Tools used?
What is Check list for review test cases ?
What is Static & dynamic Testing?