Write a program to take input from the user in the following format,
FIRSTNAME LASTNAME. Then swap the names such that the last name occurs first and the first name comes later i.e. LASTNAME FIRSTNAME
Note:
Do the same without using any extra array and without changing the default array size. Do not use any in-built functions(string functions).
For example:
Input:
Sachin Tendulkar
Output: Tendulkar Sachin
i need a algorithm and a code for the above program.