In this section, you will learn how to join the
strings. You can see in the
given example, we have define two strings and initializes two integer variables
length1 and length2 to 0. Then consider the length1 as the length of the string
s1 and length2 as the length of string s2.
Now set the length2 to 0 and by using while loop equate the two strings. Finally, the string st1 joins to st2.
Here is the code:
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: February 6, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles