Termwork PMC-103
Termwork PMC-103
3. Write a C program to take input two matrix of any order from user and print their
multiplication, if possible, with appropriate message. Also display the transpose of
resultant matrix.
4. Write a program in C to count and print the frequency of each element of an array.
e.g. A[]={2 3 4 5 4 3 1 7 8 9 8 5 1 4 5};
Unique numbers are : 2, 7, 9
Duplicate numbers are : 1, 3, 4, 5, 8
Occurrence of each number are:
2 : 1
3 : 2
4 : 3
5 : 3
1 : 2
7 : 1
9 : 1
8 : 2
5. Write a program in C to sort N numbers using either selection or insertion sort.
7. Write a C program to find the length of the longest substring of a given string
without repeating characters.
Example: Input string: “xyzwwepppw”
longest substring without repeating characters: 4 (xyzw)
8. WAP to create a structure Employee with (name, department, eid, salary) using
appropriate data types, then take input record for N employees and display the
records of all employees using structure pointer.
10. WAP to implement Single linked list using the following menu driven functions.
1. Insert at Beginning
2. Insert at End.
3. Insert at Specific Position.
4. Display
5. Delete
6. Reverse Display
7. Reverse the Linked List
8. Search
9. Sort (using selection sort)
11. Write a C program to write data in a file “Data.txt” in c:\ and then read and display
entire data from file. Also count total alphabets, digits, while space, special
characters, and number of lines in the file. Open file in absolute address format.
12. Write a C program to write formatted data (Name, department, Eid, Sal, Age) in a
file “Emp.dat” in d:\data and then read entire data from file in formatted manner
using appropriate method. Open file using absolute address format.
13. Write a C program to search a string in a file and display the occurrence of the
substring in file. Input file name and substring as command line arguments.