ya it will work but if i dont want any extra space,I have to reverse it with in that char buffer then how can i it be done..
On Thu, Jul 21, 2011 at 5:17 PM, <[email protected]> wrote: > ** Push each word into the stack and pop it out at the end of the line. > > Sent from BlackBerry® on Airtel > ------------------------------ > *From: * Saurabh <[email protected]> > *Sender: * [email protected] > *Date: *Thu, 21 Jul 2011 17:15:29 +0530 > *To: *<[email protected]> > *ReplyTo: * [email protected] > *Subject: *[algogeeks] reverse a line. > > what is the best way to reverse a line word by word in c or c++??? > > > ex - my name is john > Then after reversing it will be like - john is name my > > > > > > > > Regards > Saurabh > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards n Luv Saurabh Badhai -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
