You are on page 1of 1

MindTree Programming Test Duration: 45 minutes Candidate Name: ___________________________________ ID: ____________________________

Programming Instructions Students from computer science branches (Information Science, M.C.A., Information Technology etc) are expected to write a solution using any of these languages: C, C++, Java, or C#. Students from non-computer science branches are allowed to write a detailed flowchart, algorithm or pseudo-code. Do not use any built-in methods or libraries. Write your own functions for the task. The program should be generic. Do not hardcode any values or impose unnecessary restrictions. Handle all errors and alternative flows in the program.

Problem Statement Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: jack and jill went up a hill Return Value: kcaj dna llij tnew pu a llih

Campus Recruitment 2010-2011

MindTree Ltd.

You might also like