GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

Consider the C function given below.

int f(int j)

{

  static int i = 50;

  int k;

  if (i == j)

  {

    printf("something");

    k = f(i);

    return 0;

  }

  else return 0;

}

Which one of the following is TRUE?
(A) The function returns 0 for all values of j.
(B) The function prints the string something for all values of j.
(C) The function returns 0 when j = 50.
(D) The function will exhaust the runtime stack or run into an infinite loop when j = 50

asked in c programming by gate

1 Answer

0 votes
The function will exhaust the runtime stack or run into an infinite loop when j = 50
answered by gate

Related questions

The best answer to any question