c - Save certain number of bytes from a file into a specific memory adress -


i have open file , know how read number of bytes want want save bytes specific adress memory , dont know how can that.

the following code have:

void filesaver(char * n []){     int fil;     int bytes;     char * space = malloc(100);      fil= open("file",o_rdonly);     bytes=read(fil,space,4);      printf("%d\n",bytes );     printf("%s\n",space );   } 

the n use parameter function number of bytes want read


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -