ExamVeda
Login
Home
This question belongs to Data Structure Sorting Algorithms
Sorting Algorithms
?

There is a one line error in the following routine. Find that line.
1.	int Max(int a[], int n)
2.	{
3.		  int mi, i;
4.		  for (mi = 0, i = 0; i < n; i++)
5.		  if (a[i] > a[mi])
6.		  mi = i;
7.		  return mi;
8.	}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.