c read n bytes code
#include <stdio.h>
#define n 1024 // n bytes
int main(void) {
FILE *fp;
size_t numread;
if ((fp = fopen("yourfile.xy", "rb") != NULL) {
char buffer[n];
numread = fread(buffer, sizeof(*buffer), n, fp);
printf("Read %d Bytes: %s", numread, buffer);
fclose(fp);
return 0;
}
return -1;
}