C-Library-Functions
- Which of the following can be used for random number generation?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
random()
- Symbolic constant EOF is defined in which header file?
-
View Hint View Answer Discuss in Forum
EOF is a symbolic constant for end of file.
Typically its value is -1Correct Option: C
EOF is define in the stdio.h
It is standard input/output header file in C
- rand() and srand() functions are used _____________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
To generate random numbers
- Which is the correct way to generate numbers between minimum and maximum(inclusive)?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
minimum + (rand() % (maximum – minimum + 1));
- Which is the best way to generate numbers between 0 to 99?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
rand()%100