In section 0.5.4, the modulo operator is used in the primality() function to compute modulo 2. Calculate 14 % 7, 6 % 21, and 35 % 9.
In the primality() function of section 0.5.4, the loop condition is i < max_divisor+1. Explain why changing it to i < max_divisor causes primality() to mistakenly identify 121 as a prime number.
Write a C program that meets the following requirements:
It includes a function
int factorial(int n); The function factorial() should compute the factorial of n.
It has a main() function that tests the factorial() with inputs of 0, 1, and 8.
It prints the computed factorials.