1.

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;
}

A. 34
B. Compilation Error
C. 50
D. Any number from 0 to 49
E. None of these
Answer» B. Compilation Error


Discussion

No Comment Found

Related MCQs