Please tell where my code is wrong
Here is my code-
Waht is wrong in this code?
Hello @pragyachoudhary1111,
-
Remove the comments.
It contains some special character that is leading to a non-terminating execution of the code. -
The following statement will create an array of strings.
string str[100];
Solution:
char str[100]; -
Change the type of the parameter of the function to character array.
-
Wrong assignment:
str[i]=’’;
Solution:
str[i+1]=’’;
I have modified your code:
Hope, this would help.
Give a like if you are satisfied.