The following function is a part of some class which computes and sorts an array arr [] is ascending order using the bubble sort technique. There are some places in the code marked by ?1?, ?2?, ?3?, ?4?, ?5? which must be replaced by a statement/expression so that the function works properly:
void bubblesort (int arr [])
{ int i. j, k temp;
for (i = 0; ?1?; i ++)
{
for (j = 0; ?2?;j++)
{
arr[j] > ?3?)
{
temp = arr [j];
?4? = arr [j + 1];
arr [j + 1] = ?5?;
}
}
}
}
(i) What is the expression or statement at ?1?
(ii) What is the expression or statement at ?2?
(iii) What is the expression or statement at ?3?
(iv) What is the expression or statement at ?4?
(v) What is the expression or statement at ?5?