Match the List-I with List II and select the correct answer using the codes given below :
| List I 'C' Function | List II Include File |
|---|---|
| (a) a cos (d) | (i) time.h |
| (b) abs (i) | (ii) stdio.h |
| (c) fprint (f, ..........) | (iii) math.h |
| (d) time (p) | (iv) stdlib.h |
MH SET - 2018, SET Exam - 2018,
Answer: B
The correct matching is a-iii, b-iv, c-ii, d-i.
acos(d), the inverse cosine, is declared in math.h (iii).abs(i), the integer absolute value, is declared in stdlib.h (iv).fprintf(f, ...), printed as fprint, writes formatted output to a file stream and is in stdio.h (ii).time(p)is declared in time.h (i).
A common slip is to look for abs in math.h, which holds fabs for floating-point values; the integer abs lives in stdlib.h, which rules out the codes giving it math.h.
Please log in or register to report this question.