Team Emertxe
Strings and Storage
Classes
Assignment 10
Assignment 10
Assignment 10
WAP to print all possible combinations of given string.
Assignment 10
WAP to print all possible combinations of given string.
Input:
Assignment 10
WAP to print all possible combinations of given string.
Input: Read the String.
Assignment 10
WAP to print all possible combinations of given string.
Input: Read the String.
Output:
Assignment 10
WAP to print all possible combinations of given string.
Input: Read the String.
Output: Print all the possible combinations of given string.
Assignment 10
Example’s:
Assignment 10
Example’s:
 Input: Enter the string: ABC
 Output: All possible combinations of the given string:
• ABC
• ACB
• BAC
• BCA
• CBA
• CAB
Assignment 10
Example’s:
A B C
Input string
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
B C A
Swap A with C
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
B C A
Swap A with C
BA is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
B C A
Swap A with C
BA is fixed BC is fixed
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
B C A
Swap A with C
BA is fixed BC is fixed
C B A
Swap B with B
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
B C A
Swap A with C
BA is fixed BC is fixed
C B A
Swap B with B
C A B
Swap B with A
Assignment 10
Example’s:
A B C
Input string
Swap A with A
A B C B A C
Swap A with B
C B A
Swap A with C
A is fixed B is fixed C is fixed
A B C
Swap B with B
A C B
Swap B with C
AB is fixed AC is fixed
B A C
Swap A with A
B C A
Swap A with C
BA is fixed BC is fixed
C B A
Swap B with B
C A B
Swap B with A
CB is fixed
Assignment 10
Example’s:
A B C
Input string
A B C B A C C B A
A B C A C B B A C B C A C B A C A B
Swap A with A Swap A with B Swap A with C
Swap B with B Swap B with C Swap A with A Swap A with C Swap B with B Swap B with A
A is fixed B is fixed C is fixed
AB is fixed AC is fixed BA is fixed BC is fixed CB is fixed CA is fixed
Assignment 10
Sample execution:-
Assignment 10
Sample execution:-
Assignment 10
Sample execution:-
Assignment 10
Pre-requisites:-
Assignment 10
Pre-requisites:-
⮚Strings
Assignment 10
Pre-requisites:-
⮚Strings
⮚Arrays
Assignment 10
Pre-requisites:-
⮚Strings
⮚Arrays
⮚Pointers
Assignment 10
Pre-requisites:-
⮚Strings
⮚Arrays
⮚Pointers
Objective:-
Assignment 10
Pre-requisites:-
⮚Strings
⮚Arrays
⮚Pointers
Objective:-
To understand the concept of String manipulations.
Team Emertxe
Thank you

10_combinations.pdf