Siemens Healthineers Interview Question

Write a program to reverse words of string.