Build a program in C that accomplishes the following task:
It reads from a file the names of some certain files and their size in MB, then it distributes these files to some folders each with a maximum of N MB. The way of distribution is such that a minimum number of folders is required and one file is not appearing in two folders. Then the program gives as output a file containing the name of each file and the number of the folder in which it was assigned.
Need an idea :) Thnx in advance!