Examveda

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

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


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output