2.
Consider the following code snippet to find the smallest element in an array:
int get_min_element(int *arr, int n)
{
      int i, min_element = arr[0];
      for(i = 1; i < n; i++)
        if(_______)
          min_element = arr[i];
      return min_element;
}
Which of the following lines should be inserted to complete the above code?

5.
Which of the following code will give an error?

#include <stdlib.h> 
int main() 
{ 
     printf("%d\n", srand()); 
     return 0; 
}

#include <stdlib.h> 
int main() 
{ 
     srand(time(0)); 
     printf("%d\n", rand()%50); 
     return 0; 
}

#include <stdlib.h> 
int main() 
{ 
     srand(1); 
     return 0; 
}

#include <stdlib.h> 
int main() 
{
     printf("%d\n", rand()%50); 
     return 0; 
}

7.
Which of the following is a correct representation of inclusion exclusion principle (|A,B| represents intersection of sets A,B)?

10.
What does the following recursive code do?
void my_recursive_function(int n)
{
     if(n == 0)
     return;
     my_recursive_function(n-1);
     printf("%d ",n);
}
int main()
{
     my_recursive_function(10);
     return 0;
}