What will be the output of the following C code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%d\n", rand() % 1000);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%d\n", rand() % 1000);
return 0;
}
A. Compile time error
B. An integer between 0-1000
C. An integer between 0-999 including 0 and 999
D. An integer between 0-1000 including 1000
Answer: Option C
Join The Discussion