a part of an assignment of mine is based on an array (its size is given by the user) which contains random numbers from 1 to 10^10. Then we have to find the k-th smaller number
Problem #1, an int will only hold a number of size 2^31 in size. You'll need a slightly bigger alternative for your pin array.
Also, multiplying your two random numbers together really doesn't do much - except perhaps make the number less random.
Next, you can't create an array on the stack dynamically with the user's input. That will require a new solution to make alloc an array for you.