Examveda

Predict the output of the following code.
#include <stdlib.h> 
int main() 
{ 
     srand(0); 
     printf("%d\n", rand()); 
     return 0; 
}

A. compilation error

B. random number between 0 to RAND_MAX

C. cannot be predicted

D. 0

Answer: Option B


This Question Belongs to Data Structure >> Miscellaneous On Data Structures

Join The Discussion

Related Questions on Miscellaneous on Data Structures