Cognizant Interview Question

I was given a problem and was asked to write a code in C.