250+ TOP MCQs on GCD and LCM using Recursion Multiple Choice Questions and Answers (MCQs) and Answers

Data Structures & Algorithms Multiple Choice Questions on “GCD and LCM using Recursion – 2”.

1. LCM is also called as ________
a) GCD
b) SCM
c) GCF
d) HCF

Answer: b
Clarification: GCD (Greatest Common Divisor), GCF (Greatest Common Factor), HCF (Highest Common Factor) is not an alias for LCM. LCM is also called as Smallest Common Multiple(SCM).

2. What is the LCM of 8 and 13?
a) 8
b) 12
c) 20
d) 104

Answer: d
Clarification: 104 is the smallest positive integer that is divisible by both 8 and 12.

3. Which is the smallest number of 3 digits that is divisible by 2, 4, 8?
a) 100
b) 102
c) 116
d) 104
Answer: d
Clarification: LCM of 2, 4, 8 is 8. So check for the number that is divisible by 8. So 104 is the smallest number that is divisible by 2, 4, 8.

4. Which of the following is also known as LCM?
a) Lowest Common Divisor
b) Least Common Multiple
c) Lowest Common Measure
d) Highest Common Multiple
Answer: a
Clarification: Least Common Multiple is also known as LCM or Lowest Common Multiple.

5. What is the LCM of two coprime numbers?
a) 1
b) 0
c) Addition of two coprime numbers
d) Multiplication of two coprime numbers

Answer: d
Clarification: Coprime numbers have GCD 1. While LCM of coprime numbers is the product of those two coprime numbers.

6. In terms of Venn Diagram, which of the following expression gives LCM (Given A ꓵ B ≠ Ø)?
a) Multiplication of A U B terms
b) Multiplication of A ꓵ B terms
c) Multiplication of A*B terms
d) Multiplication of A-B terms
Answer: a
Clarification: In terms of Venn Diagram, the LCM is given by the Union of two sets. So A U B gives the LCM. While A ꓵ B gives the GCD.

7. What is the LCM according to the given Venn Diagram?
gcd-lcm-recursion-interview-questions-answers-q7
a) 2
b) 3
c) 180
d) 6
View Answer

Answer: c
Clarification: In terms of Venn Diagram, the LCM is given by the Union of two sets. So A U B gives the LCM. So product of all the terms is 180.

8. What is the lcm (a, b)?
a) a + b
b) gcd (a-b, b) if a>b
c) lcm (b, a)
d) a – b

Answer: c
Clarification: Since the LCM function is commutative, so lcm (a, b) = lcm (b, a).

9. What is the LCM of 48, 18, 6?
a) 122
b) 12*2
c) 3
d) 6

Answer: a
Clarification: The LCM of 48, 18, 6 is 144 and 122 is 144.

10. Is 9 and 28 coprime number.
a) True
b) False

Answer: a
Clarification: Coprime numbers have GCD 1 and LCM is the product of the two given terms. So 9 and 28 are coprime numbers.

11. What is the following expression, lcm (a, lcm (b, c) equal to?
a) lcm (a, b, c)
b) a*b*c
c) a + b + c
d) lcm (lcm (a, b), c)

Answer: d
Clarification: Since LCM function follows associativity, hence lcm (a, lcm (b, c) is equal to lcm (lcm (a, b), c).

12. Is lcm an associative function.
a) True
b) False

Answer: a
Clarification: The lcm function is an associative function as lcm (a, lcm (b, c) is equal to lcm (lcm (a, b), c).

13. Which is the correct term of the given relation, lcm (a, b) * gcd (a, b) =?
a) |a*b|
b) a + b
c) a – b
d) a / b

Answer: a
Clarification: The lcm is closely related to gcd as lcm (a, b) * gcd (a, b) = |a*b|.

14. What is the following expression, lcm (a, gcd (a, b)) equal to?
a) a
b) b
c) a*b
d) a + b
Answer: a
Clarification: Since the lcm function follows absorption laws so lcm (a, gcd (a, b)) equal to a.

15. Which algorithm is the most efficient numerical algorithm to obtain lcm?
a) Euler’s Algorithm
b) Euclid’s Algorithm
c) Chebyshev Function
d) Partial Division Algorithm
Answer: b
Clarification: The most efficient way of calculating the lcm of a given number is using Euclid’s algorithm which computes the lcm in much lesser time compared to other algorithms.

contest

Leave a Reply

Your email address will not be published. Required fields are marked *