GATE | GATE-CS-2014-(Set-2) | Question 65

Last Updated :
Discuss
Comments

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;
Share your thoughts in the comments