0% found this document useful (0 votes)
65 views1 page

For Example:: Practice Assignment - Technical Paper 1 - DSC

This document outlines 5 practice programming assignments involving arrays and linked lists: 1. Create a menu-driven program to perform array operations like creation, display, insertion, deletion, search, and sorting. 2. Create a menu-driven program to implement a singly linked list of employees with operations like adding an employee, deleting an employee, searching by salary, and displaying all employees. 3. Create a singly linked list by subtracting subsequent numbers in a given list of integers. Count the number of negative terms in the resulting list. 4. Create a singly linked list from a given list of integers. Traverse the list in reverse order and delete numbers appearing at even positions if they are negative.

Uploaded by

Sunil Kumar
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)
65 views1 page

For Example:: Practice Assignment - Technical Paper 1 - DSC

This document outlines 5 practice programming assignments involving arrays and linked lists: 1. Create a menu-driven program to perform array operations like creation, display, insertion, deletion, search, and sorting. 2. Create a menu-driven program to implement a singly linked list of employees with operations like adding an employee, deleting an employee, searching by salary, and displaying all employees. 3. Create a singly linked list by subtracting subsequent numbers in a given list of integers. Count the number of negative terms in the resulting list. 4. Create a singly linked list from a given list of integers. Traverse the list in reverse order and delete numbers appearing at even positions if they are negative.

Uploaded by

Sunil Kumar
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/ 1

Practice Assignment -Technical Paper 1 -DSC

1. Write a menu driven program to perform various array operations :


1. Create 2.Display 3. Insert 4.Delete 5.Search 6.Sort 7.exit
2. Write a menu driven program to create a singly linked list of employee
(empid, name, salary) and provide following operation:
1. Add Employee at beginning
2. Add Employee at given position
3. Delete the Employee from end
4. Search employee by salary
5. Display all employees.
6. Exit
3. Create a singly linked with given integer numbers. Subtract sub-sequent
numbers and result as next node immediately after them. Count number of
negative terms in the resultant linked list.
For example:
Given numbers: 3, 5, 8, 2, -4, 5, 7.
Resultant linked list: 3  5 -2 8 2 6 -4 5 -9 7.
Number of negative numbers: 3
4. Create a singly linked with given integer numbers. Traverse the linked list in
reverse order. While traversing, if negative number appears on even
position, then delete all such numbers.
For example:
Given numbers: -3, -5, -8, -2, 4, 6, -7.
Positions from reverse: 7, 6, 5, 4, 3, 2, 1.
Resultant linked list: -3, -8, 4, 6, -7.
5. Create an array of given positive numbers. Find unique elements from that
array. All deleted elements should be at the end of array and marked as -1.
Do not sort the array elements.
For example:
Given numbers: 4, 2, 5, 6, 2, 4, 2, 5, 2, 1.
Resultant array: 4, 2, 5, 6, 1, -1, -1, -1, -1, -1.

You might also like