I want to write a generic function which takes in a void pointer and length as input and writes the data referenced by the pointer to a file.
Another generic function which takes in a void pointer, length and offset and reads back the data to the memory referenced by the void pointer from the file.
Is it possible in C?
As fprintf needs the datatype to be specified, how can I achieve doing this? Is there any work around?
Thanks a lot for your time.