I want to read the content of a file and store it in a string and use it as part of my script.
Right now i am doing it with the below code:
char Content[2936];
InPutFile=fopen(Filename,"r");
fread(Content,sizeof(char),2936, InPutFile);
fclose(InPutFile);
I have manually checked the size of the file from properties and used the same (2936), which i want to avoid.
Is there any better way to do it? Especially when we don't know the size of the file.