C-Library-Functions


  1. Which of the following can be used for random number generation?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    random()


  1. Symbolic constant EOF is defined in which header file?









  1. View Hint View Answer Discuss in Forum

    EOF is a symbolic constant for end of file.
    Typically its value is -1

    Correct Option: C

    EOF is define in the stdio.h
    It is standard input/output header file in C



  1. rand() and srand() functions are used _____________











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    To generate random numbers


  1. Which is the correct way to generate numbers between minimum and maximum(inclusive)?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    minimum + (rand() % (maximum – minimum + 1));



  1. Which is the best way to generate numbers between 0 to 99?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    rand()%100