Array and Strings – Algebra – Problem #13
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Difficulty: medium
Problem Statement
Read an integer n (< 100). Input an integer array A[] of n elements from the user. The array can have multiple occurrences of elements. You have to remove the multiple occurrences of elements and store the distinct elements in a new array. The memory for the new array has to be dynamically allocated using malloc such that its size is same as the number of distinct elements in A[].