Cognizant Interview Question

Basic c coding