Cognizant interview question

Simple programs using c language