Message from C, C++ discussions

December 2019

— atom_t Look at his char array init...

— 

It reverse the string but not return the reversed string. It reverse the string in place. Meaning the reversed string is in the original variable passed.

Just change you code to this.
Strrev(recieved_string);
Printf("%s", recieved_string);

You can check for failure from the strrev return

— Returns code of operation ?

— I dont know what it returns. But the reversed string is returned by the passed argument not by the returned value.

Message permanent page

— char string[] = "good bye"
for (i = 0; string[i]!='\0'; i++)
But u didn't place a 0-term into array...

Message permanent page

— It is in place operation

— He has a lot of mistakes with arrays.

— Ya I think s/he is beginner

— S/he is opening and closing the file just to read and write.😀

— What s/he can do is just open it for read and write and when done close.

— Learn about arrays. Char arrays and operations with file.

— No this