- #1

jostpuur

- 2,116

- 19

Here's the same thing in other form, just in case the title isn't clear: Is it possible that the following function returns 1, or is it always 0?

Code:

```
x = rand();
y = rand();
return (x == y);
```

There's two possibilities. Either the probability for 1 is precisely zero, or then the probability 1 is something very small but non-zero.

I'm programming with c, and this is a rand-function that requires stdlib.h to be included.