Suppose n and p are unsigned int variables in a C program. We wish to set p to nC3. If n is large, which of the following statements is most likely to set p correctly?
p = n * (n-1) * (n-2) / 6;
p = n * (n-1) / 2 * (n-2) / 3;
p = n * (n-1) / 3 * (n-2) / 2;
p = n * (n-1) * (n-2) / 6.0;
This question is part of this quiz :
C Data Types,GATE-CS-2014-(Set-2)