-
What is the output of this program?
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main ()
{
srand (time(NULL));
printf ("Random number is: %d\n", rand() % 50);
srand (1);
return 0;
}
-
- 34
- Compilation Error
- 50
- Any number from 0 to 49
- None of these
Correct Option: A
This program will create a random number based on time function using srand function.