Professional Documents
Culture Documents
Friday 56
Friday 56
Periodical Lab 1
(30 Marks)
Set – 1
1. An online retailer sells five different products whose retail prices are shown
in the following table.
Write a C program that reads quantity sold one day of each product to print
summary of a week’s selling status. A sample session follows.
Weekly statement
product no quantity Unit price amount
1122 2 149.00 298.00
2211 3 225.00 675.00
2121 1 499.50 499.50
1212 2 224.50 449.00
2112 3 343.50 1030.50
2. Given two unsorted arrays (with duplication of elements allowed), write a
program to check whether both arrays have same elements are not.
MENU
---------------------
1. TV
2. Washing machine
3. Refrigerator
4. Computer
5. Laptop
6. ipod
---------------------
THANK YOU
2. Given a sorted array, write a program that makes array elements distinct by
increasing element values but at the same time keeping array sum minimum
possible. Print the modified array and minimum sum.
Given {20, 20} the output should be {21, 20} or {20, 21} and sum =
41.
Given {3, 4, 6, 8} the output should be No change (as all the array
elements are already distinct).