1.

Which option is necessary to compile a C program havin math functions?(a) -lm(b) -ln(c) -lp(d) -lqThis question was posed to me in a job interview.Enquiry is from Compiling and Linking Client Programs topic in portion MySQL Programs Using C of MySQL

Answer»

Right option is (a) -lm

Explanation: To COMPILE a program written in the C LANGUAGE, it is compiled by ISSUING the option ‘-lm’. The examples of some MATH functions found in ‘math.h’ are floor(), sqrt(), pow(), log().



Discussion

No Comment Found

Related InterviewSolutions