Week 10: Friday (Saturday) -------------------------- Q1. (50) Input an integer array a of size 15 from the user. The array can have multiple occurrences of elements. You have to remove the multiple occurences of elements and store the distinct elements in a new array along with their count. The memory for the new array has to be dynamically allocated using malloc such that its size is twice the number of distinct elements in A. For example, if array a is 3 4 5 1 4 5 2 4 6 4 2 5 6 3 5 then the output is 3 2 4 4 5 4 1 1 2 2 6 2 of size 6 * 2. Q2. (50) Input a positive integer n from the user and then input n vectors of size 3. The memory for storing these n vectors of size 3 must be allocated dynamically and together. Now, compute the pairwise distance among these n vectors and store them in a nxn matrix. The memory for this matrix should also be stored dynamically. The distance between two vectors is the Euclidean distance, i.e., if the two vectors are x1, x2, x3 and y1, y2, y3, then the distance between them is sqrt((x1 - y1)^2 + (x2 - y2)^2 + (x3 - y3)^2). Use the sqrt function and math.h. Use gcc -lm to compile.