Relative Content

Tag Archive for cmallocrealloc

Issue with using realloc – not getting expected amount of memory

I have to write a program that is able to take in a file of grades, read them, and then provide some options to be able to edit that file. I decided to write it in C (for the challenge, and to learn more about C). I have a function that receives a pointer, and then opens a file and loads the characters from that file, into the memory provided by that pointer.

Issue with using realloc – not getting expected amount of memory

I have to write a program that is able to take in a file of grades, read them, and then provide some options to be able to edit that file. I decided to write it in C (for the challenge, and to learn more about C). I have a function that receives a pointer, and then opens a file and loads the characters from that file, into the memory provided by that pointer.