0

Is there any other method to copy string of A="hello"; to string B without using #Loops, #sitring functions, #simple assignment

i know it is possible..... i just want to know how many of you guys know about it...:p

24th Feb 2017, 3:43 PM
Deepak Sharma
Deepak Sharma - avatar
5 Antworten
+ 1
Without the use of string functions, you are going to have to use an assignment somewhere, so please elaborate on what's allowed.
24th Feb 2017, 5:10 PM
Zeke Williams
Zeke Williams - avatar
+ 1
its a funny answer and you gys already know about it......... actually this is a tricky question which is mostly asked on technical interviews.... . . .and about answers.....there are two ways to done this thing out... 1. simply put a goto and iteratively call a bunch of statements including if condition to terminate and continue after execution part. 2. we can also use RECURSION ...by calling the same function upto the length of string and terminate the recursion.
25th Feb 2017, 5:05 PM
Deepak Sharma
Deepak Sharma - avatar
+ 1
But did you have to use an assignment symbol ANYWHERE in the examples you just provided?? Because in your title, you made is seem like using the equals sign wasn't allowed. Also GOTO coding is poor practice and tends to get really messy anyways.
27th Feb 2017, 4:20 PM
Zeke Williams
Zeke Williams - avatar
0
with overloaded equal to operator you can copy one string to another string A="hello"; string b=a; now b holds value hello
24th Feb 2017, 3:46 PM
ravi kumar K N
0
here i have mentioned above to do not use the simple assignment
24th Feb 2017, 3:51 PM
Deepak Sharma
Deepak Sharma - avatar