>Define rational number as an ADT (abstract data structure)
I fail to see how this is difficult. What kept you from completing the exercise?

>Write a suitable C code to sort a finite set of elements
>where an element may appear a large number of times
Well any general sorting algorithm will do this, so now you only need to find one where the processing of duplicate values is efficient. Might I suggest counting sort?

Actually, I just couldn't understand the question.
All I know about rational numbers is that they are Set of Real Numbers minus Set of Irrational Numbers Or another way of defining them is "Any number that can be expressed in p/q format where q≠0 (p & q belong to set of integers)"
But I don't know how to express them as an ADT

>Any number that can be expressed in p/q format where q≠0 (p & q belong to set of integers)
Translation: rational numbers can always be represented by a fraction p/q where q is not zero. So you need to write a common fraction "class":

typedef struct rational {
int numerator;
int denominator;
} rational;

This is a program that ask input from the user about the characteristics of a gemstone then prints to the screen. Things like color, price and name. I have written ...