Initial Basics – Algebra – Problem #27
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Problem Statement
Write a C Program that will read four integer values, find how may of them are unique and print only the unique elements in ascending order. For example, if the integers read in are 5, 8, 1,5 then you will first print that there are 3 unique elements and then print 1, 5, 8. Save the file as A02_<Roll Number>.c (example A02_21AG10002.c). Build, Run for and test it for the given data.Then upload the .c file for the Assignment. In particular, you will do the following: 1. Read in four integers and print them. 2. Print how many unique elements are there. 3. Print the unique elements in ascending order. Test Data: 1. 7, 1, 7, 1 2. 4, 4, 4, 2 3. 1, 5, 8, 2 4. 5, 5, 5, 5