0
Repeat a string n times with the character c between
I want my output is "all right, all right, all right". Could someone have for a look to my code below where is wrong? Thanks https://code.sololearn.com/c8DSPjkjpDIT/#c
2 odpowiedzi
+ 1
you returned the pointer to the local variable which can't be used by the main function, while returning pointers return those from the main function or global variables, I have corrected your function to take output string pointer as an argument.
https://code.sololearn.com/cR5z0gy7cAtv/?ref=app
+ 1
thanks for your help =))