0

How to reverse words in C using file handling concept.

Input:If file sample.txt has text I love C Output: C love I

26th Apr 2020, 10:33 AM
Nicky
Nicky - avatar
1 Resposta
0
Read the file into a charecter array and print array in reverse by using splitting function strtok().. Edit: Or for reverse words, this may help you.. https://www.includehelp.com/code-snippets/c-program-to-split-string-into-the-words-separated-by-spaces.aspx
26th Apr 2020, 10:02 PM
Jayakrishna 🇮🇳