Answer:
Following are the program in python language
def cat_rev(x,y,z): # function definition
x=x[::-1]# reverse the first string
y=y[::-1]# reverse the second string
z=z[::-1]# reverse the third string
z=x+y+z; #concat the string
return(z)#return the string
#main method
s=input("Enter the first string:") #read the first string
r=input("Enter the second string:")#Read the second string
t=input("Enter the third string:")#Read the third string by user
rev1= cat_rev(s,r ,t ) #function calling
print(rev1)# display reverse string
Output:
Enter the first string:san
Enter the second string:ran
Enter the third string:tan
nasnarnat
Explanation:
Following are the description of program
- In the main function we read the three value by the user in the "s", "r" and "t" variable respectively.
- After that call the function cat_rev() by pass the variable s,r and t variable in that function .
- Control moves to the function definition of the cat_rev() function .In this function we reverse the string one by one and concat the string by using + operator .
- Finally in the main function we print the reverse of the concat string .