Discussion
The statement
# include < math.h>
is written at the top of a program to indicate
Answer: C
Correct answer: that certain information about mathematical library functions are to be included at the begnning of the program
#include <math.h> directs the preprocessor to insert the contents of the header at that point - the declarations of the mathematical library functions, along with any macros and types they need.
What it brings in is declarations, not the functions themselves: the code lives in the library and is joined at link time. Without the header the compiler would have to guess at the return types, and a call to sqrt would be assumed to return int, giving silently wrong results.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development