0% found this document useful (0 votes)
58 views2 pages

Termwork PMC-103

The document outlines 13 term work assignments for a programming course. The assignments include: 1) Rearranging an array in alternating order of smallest to largest elements. 2) Checking if a matrix is an identity matrix. 3) Matrix multiplication and transposing the result. 4) Counting frequencies of elements in an array. 5) Sorting numbers using selection or insertion sort. 6) Non-linear search in log(N) time. 7) Finding the longest substring without repeating characters. 8) Creating and manipulating an employee structure. 9) Menu driven operations on an array of structures. 10) Implementing single linked list functions. 11) Reading/writing a file counting characters. 12) Reading/writing formatted employee data to a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views2 pages

Termwork PMC-103

The document outlines 13 term work assignments for a programming course. The assignments include: 1) Rearranging an array in alternating order of smallest to largest elements. 2) Checking if a matrix is an identity matrix. 3) Matrix multiplication and transposing the result. 4) Counting frequencies of elements in an array. 5) Sorting numbers using selection or insertion sort. 6) Non-linear search in log(N) time. 7) Finding the longest substring without repeating characters. 8) Creating and manipulating an employee structure. 9) Menu driven operations on an array of structures. 10) Implementing single linked list functions. 11) Reading/writing a file counting characters. 12) Reading/writing formatted employee data to a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

TERM WORK

For End Term Lab (PMC-103 / PMI-103)

1. Write a program in C to rearrange an array in such an order that– smallest, largest,


2nd smallest, 2nd largest and so on.

2. Write a program in C to check whether a given matrix is an identity matrix .

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.

6. Write a program in C to implements the non-linear search within N element in


log(N) time. Explain, if there is any necessary condition for this search.

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.

9. Write a Menu driven program to perform the following operations on array of


structure of above (Student) data type:
1. Insert
2. Display
3. Delete
4. Search

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.

You might also like