Cognizant Interview Question

basic ques from c and SQL