Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2018 | Question 43
  • Last Updated : 03 Jul, 2018

Assume A and B are non-zero positive integers. The following code segment
while ( A != B) {
If ( A > B )
A – = B ;
else
B – = A ;
}
cout << A; // printing the value of A (A) Computes the LCM of two numbers
(B) Divides the larger number by the smaller number
(C) Computes the GCD of two numbers
(D) Finds the smaller of two numbers


Answer: (C)

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :