Machine-translated by Google. Questions are authored in English.
Top

Discussion

Match the List-I with List II and select the correct answer using the codes given below :

List I 'C' FunctionList 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

  • A.a-i, b-ii, c-iii, d-iv
  • B.a-iii, b-iv, c-ii, d-i
  • C.a-iv, b-iii, c-ii, d-i
  • D.a-ii, b-iii, c-iv, d-i

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.