I have gone through fread
function where syntax is like when I gone through some examples for fread
I found the below code.
I understood that in the fread
function first parameter is address of block of memory to store the objects, second parameter is size of each object in bytes, third parameter is no of objects, final parameter is pointer to the file.
Syntax:
size_t fread(void * buffer, size_t size, size_t count, FILE * stream).
Code:
int a_var= 0;
FILE *file;
fread(&(a_var),4,1,file);
I don't understood why a_var
is used there. Does it indicate address for value 0 or address 0?