C-Library-Functions


  1. What will be the output of the following C code?
    #include <stdio.h>
    #include <math.h>
    int main()
    {
    unsigned int num = 15;
    printf("%f\n", fabs(num));
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    15.000000


  1. What type of inputs are accepted by mathematical functions?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    double



  1. Which of the following is not a valid mathematical function?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    fmod(x);


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    cc -lm filename.c



  1. What will be the output of the following C statement?
    int ungetc(int c, FILE *fp)











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Either c or EOF for an error