Assume A and B are non-zero positive integers. The...
Guiding State PSC aspirants since 2016 50,000+ students · 1,000+ final selections Exam Calendar Results Call 9116926003
pscnotes
Pick your state
GPSC Prelims previous year questions

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

Asked in GPSC Assistant Director (IT), Class-1 2025

  1. Computes the LCM of two numbers
  2. Divides the larger number by the smaller number
  3. Computes the GCD of two numbers
  4. Finds the smaller of two numbers

Answer under review: our editors are checking this question. Try the other GPSC Prelims previous year questions questions meanwhile.

More GPSC Prelims previous year questions questions

All 77,252 GPSC Prelims previous year questions questions →