Lets say I want to create a function which load a file and return a string which contain it's content.
the signature is:
char* load_file(char* filename);
the problem is that I'm using 'malloc' inside my function - and I'm putting the client of this function to be responsible for 'free' the allocated space.
How should i do it right?
thanks in advance,
itay