Units

### Unit: Mathematical Functions - Questions and Answers

Practice these Mathematical Functions under C Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Mathematical Functions for following purpose.

– Anyone who is wishing to increase their perfect knowledge of Mathematical Functions of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically  Mathematical Functions.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Mathematical Functions under C Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of   Mathematical Functions topic of C Programming:

1.

cos(x) returns

Explanation:

2.

function fabs defined math.h header file takes argument of type integer.

Explanation:

3.

Which of the following mathematical function requires 2 parameter for successful function call?

Explanation:

4.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    #include <math.h>`
3. `    void main()`
4. `    {`
5. `        int k = fabs(-87);`
6. `        printf("%d\n", k);`
7. `    }`

Explanation:

5.

Which mathematical function among the following does NOT require int parameters?

Explanation:

6.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    #include <math.h>`
3. `    int main()`
4. `    {`
5. `        int i = 90;`
6. `        printf("%f\n", sin(i));`
7. `        return 0;`
8. `    }`

Explanation:

7.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    #include <math.h>`
3. `    int main()`
4. `    {`
5. `        unsigned int i = -1;`
6. `        printf("%f\n", fabs(i));`
7. `        return 0;`
8. `    }`

Explanation:

8.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    #include <math.h>`
3. `    void main()`
4. `    {`
5. `        int k = sqrt(-4);`
6. `        printf("%d\n", k);`
7. `    }`

Explanation:

9.

In linux, apart from including math header file, the program is successfully executed by which of the following?

Explanation:

10.

What type of inputs are accepted by mathematical functions?

Explanation:

11.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    #include <math.h>`
3. `    void main()`
4. `    {`
5. `        int k = pow(2, 3);`
6. `        printf("%d\n", k);`
7. `    }`

Explanation:

12.

Which among the following mathematical function do not have a “double” return-type?

Explanation:

13.

sin(x) returns

Explanation:

14.

What is the output of this C code?

1. `    #include <stdio.h>`
2. `    #include <math.h>`
3. `    int main()`
4. `    {`
5. `        int i = 10;`
6. `        printf("%f\n", log10(i));`
7. `        return 0;`
8. `    }`