Cognizant Interview Question

Write a program to print duplicate words from array?