Team Emertxe
Strings and Storage
Classes
Assignment 5
Assignment 5
Assignment 5
WAP to reverse the given string using iterative method
Assignment 5
WAP to reverse the given string using iterative method
Input:
Assignment 5
WAP to reverse the given string using iterative method
Input: Read the String
Assignment 5
WAP to reverse the given string using iterative method
Input: Read the String
Output:
Assignment 5
WAP to reverse the given string using iterative method
Input: Read the String
Output: Print the reversed string.
Assignment 5
Example’s:
 Input: Extreme
 Output: emertxE
E x t r e m e 0
e m e r t x E 0
Input string
Output string
Assignment 5
Example’s:
 Input: Extreme
 Output: emertxE
E x t r e m e 0
e x t r e m E 0
swap
Input string
Output string
1st iteration
Assignment 5
Example’s:
 Input: Extreme
 Output: emertxE
E x t r e m e 0
e m t r e x E 0
swap
Input string
Output string
2nd iteration
Assignment 5
Example’s:
 Input: Extreme
 Output: emertxE
E x t r e m e 0
e m e r t x E 0
swap
Input string
Output string
3rd iteration
Assignment 5
Example’s:
 Input: Extreme
 Output: emertxE
E x t r e m e 0
e m e r t x E 0
Input string
Output string
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
h e l l o w o r l d 0
Input string
Output string d l r o w o l l e h 0
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
swap
Input string
Output string
h e l l o w o r l d 0
d e l l o w o r l h 0
1st iteration
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
swap
Input string
Output string
h e l l o w o r l d 0
d l l l o w o r e h 0
2nd iteration
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
swap
Input string
Output string
h e l l o w o r l d 0
d l r l o w o l e h 0
3rd iteration
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
swap
Input string
Output string
h e l l o w o r l d 0
d l r o o w l l e h 0
4th iteration
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
Input string
Output string
h e l l o w o r l d 0
d l r o w o l l e h 0
swap
5th iteration
Assignment 5
Example’s:
 Input: hello world
 Output: dlrow olleh
Input string
Output string
h e l l o w o r l d 0
d l r o w o l l e h 0
Assignment 5
Sample execution:-
Assignment 5
Sample execution:-
Assignment 5
Sample execution:-
Assignment 5
Pre-requisites:-
Assignment 5
Pre-requisites:-
⮚Strings
Assignment 5
Pre-requisites:-
⮚Strings
⮚Loops
Assignment 5
Pre-requisites:-
⮚Strings
⮚Loops
Objective:-
Assignment 5
Pre-requisites:-
⮚Strings
⮚Loops
Objective:-
To understand the concept of reversing the string using
iterative method.
Team Emertxe
Thank you

05_reverseiter.pdf