Given a string"My name is Girish" write a code snippet to make it "Girish is name My" (one of the optimistic ways)
This is a 2 step process: Step 1 : Reverse the whole string "My name is Girish". It becomes "hsiriG si eman My". Step 2: Reverse each word which makes it "Girish is name My".
No comments:
Post a Comment