In the following C program, every time program is run different numbers are generated.
#include <stdio.h>
int main()
{
srand(time(NULL));
printf("%d\n", rand());
return 0;
}
#include <stdio.h>
int main()
{
srand(time(NULL));
printf("%d\n", rand());
return 0;
}A. True
B. False
C. Depends on the platform
D. Depends on the compiler
Answer: Option A

Join The Discussion