Question:- Write a C program to reverse the words in a sentence in place !

To reverse the words in sentence in place, lets we understand the pseudo-code of program with example of sentence like “This is”, So our output would be “ is This”.


Step 1 : Reverse the individual words

“sihT si moc.sedocmrif “

Step 2 : Reverse the whole string

“ is This”



 Reverse the words in string in place

Suggested Reading

  1. Write your own trim() or squeeze() function to remove the spaces from a string
  2. Write C code to implement the strstr() function to search for a substring
  3. Write a C program which does wildcard pattern matching algorithm
  4. structure padding and packing in c example