One option would be to create a struct called Fruit with a name and a price and store the fruits in a vector or array. In this way you can easily sort them or find a specific one.
"Using stdio.h" states that you are programming with C rather than C++. Is that correct?
Logically, your data is a table with two columns: name and price.
You want to sort the rows of that table by the price column. Then you want to print three rows.
On the second part you want to print every row, where price criteria is true
You do need a data-structure for storing the data in memory. Such structure that supports the necessary operations.