String class..........----------

string reverseWord(string str){

//Your code here
int l=str.length();
string s;
int cnt=0;
for(int i=l-2;i>=0;i–){
s[cnt++]=str[i];
}
return s;

}
this is function for reversing a string . i am not getting any output what is wrong in it

hello @poojadas408

pls share ur complete code by saving it here->https://ide.codingblocks.com/

check now (comment added)->

i have send you the code now tell

@poojadas408

pls check my last response , i have already shared u the corrected code

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.