ProgrammingVery hard
Using the extended Euclidean algorithm, what is the inverse of 10 modulo 17?
- A. 7
- B. 12
- C. 5
- D. 10
Correct answer: B. 12
10 x 12 = 120 = 7 x 17 + 1, so 12 is the inverse. 7 gives 70 = 4 x 17 + 2, which is wrong.
More C Programming questions
- What is the number of 1 bits in 0xF0F0 (a 16-bit value)?
- An 8-bit value 0b10010110 is rotated left by 3 positions within 8 bits. What is the result in decimal?
- unsigned char s = 0; for (int i = 1; i <= 100; i++) s += i; printf("%d", s); What is printed?
- What is (1ULL << 40) % 1000 in C?
- For the signed integer -17, which expression gives the non-negative remainder modulo 5 in C?
- In 32-bit signed int arithmetic, what is the largest n such that the sum 1 + 2 + ... + n does not overflow?