Frage im Vorstellungsgespräch bei Cognizant

Write a program to find the largest element in an array.