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

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -