Skip to content
Related Articles

Related Articles

Improve Article

GATE | Gate IT 2008 | Question 79

  • Last Updated : 28 Jun, 2021

Consider the code fragment written in C below :

void f (int n)
  if (n <=1)  {
   printf ("%d", n);
  else {
   f (n/2);
   printf ("%d", n%2);

What does f(173) print?

(A) 010110101
(B) 010101101
(C) 10110101
(D) 10101101

Answer: (D)

Explanation: (173)2 = 10101101

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :