Data Structure Lab
CIS · Final · Fall 24
Batch 19_A
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Lab Final Examination: Fall-2024
Course Code: CIS 122L (Batch: 19_A)
Course Title: Data Structure Lab
Date: 14/12/2024
Time: 1 Hour
Total Marks: 40
1. Implement a stack in C using an array. The program should include both Push and Pop operations, as well as a function to display the elements of the queue. [20]
2. Consider an array M that contains 10 integers (the numbers are provided by the user). Now, implement a C program that splits the array M into two arrays based on even and odd indices. [Assume that the values at odd indices are stored in array A, and the values at even indices are stored in array B] [20]
Additionally, calculate the sum of the values in both arrays and compare the sums to determine which array has the greater total.