0% found this document useful (0 votes)
16 views

Assignment 1

The document outlines 5 programming assignments: 1) sort and remove duplicates from an array, 2) compute the determinant of a 5x5 matrix, 3) compute the distance between points and the area of a triangle, 4) count vowels/consonants and uppercase/lowercase in a string, 5) print unique characters with their frequencies.

Uploaded by

FGGGP
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Assignment 1

The document outlines 5 programming assignments: 1) sort and remove duplicates from an array, 2) compute the determinant of a 5x5 matrix, 3) compute the distance between points and the area of a triangle, 4) count vowels/consonants and uppercase/lowercase in a string, 5) print unique characters with their frequencies.

Uploaded by

FGGGP
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

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
               

You might also like