CSE115L
Assignment 1
Marks: 10 Sec: 11, 12 Submission Date: 11:59 pm, 10 th Dec
1. You have a one-dimensional array A with n number of integer value (user
input). You have to write a program to sorting them and also eliminating all
repeated integer values.
Sample Input:
A [] = [-2, 12, 45, -9, 1, 5, 12, -2]
Sample Output:
-9, -2, 1, 5, 12, 45
2. Write a program to obtain the determinant value of a 5 x 5 matrix.
3. Write a function to compute the distance between two points (points are
given by the user), and use it to develop another function that will compute
the area of the triangle whose vertices are A(x1, y1), B(x2, y2), and C(x3,
y3).
Use these functions to develop a function which returns a value 1 if the point
(x, y) lines inside the triangle ABC, otherwise a value 0.
4. Write a C program to take a string as input and
i. Count total number of vowel and consonant in that string.
ii. Now replace lowercase vowels by uppercase and vice-versa.
Sample Input: a=Q78u*Ic?K!b$R(ow/Nf%O#x
Sample Outputs:
The total number of vowel in the string is : 5
The total number of consonant in the string is : 9
Filtered String: A=Q78U*ic?K!b$R(Ow/Nf%o#x
5. Given a string, that contains alphabets (‘a’ to ‘z’ and ‘A’ to ‘Z’), write a
function to print string by inserting the frequency of each unique character
after it and also eliminating all repeated characters.
Sample Input: CLeeeEEMMMss
Sample Output: C1L1e3E2M3s2
Sample Input: ccccOddEEE
Sample Output: c4O1d2E3