Please help me. I am A bgineer of C language and i want a solution of my question that is;--- "A program that print each world of a given string reverse".
If any one of you can solve this than please give me an answer
>The question isn't to reverse the words in a string.
Yes, it is. "Print each word of a given string in reverse". There's just no requirement that the reversal be permanent, which gives one quite a few options in solving the problem. Tokenizing the string is one of them. In order of impressiveness (from least to most) without adding any new restrictions, I would say these are the expected solutions:
1) iamthwee's copy to extra storage (which is technically tokenizing ;))
2) A direct print using a similar technique as iamthwee
3) Tokenizing the string and printing it with extra storage
4) Tokenizing the string and printing it with recursion
5) A recursive print without tokenizing
6) A flip-flop in place reversal
If the original question is the start of an interview problem, I have no doubt that further restrictions would be added so as to direct the interviewee to one of the latter solutions.