Question d’entretien chez Wipro

Write a program to count words in the string