It is not very clear what you are trying to do, but this is my guess anyway: you are reading blocks of data from a file, each 256 bytes in length:
char pinakas[256]; //this is the memory buffer for one page
int y = ...; //this is the page number
int p;
fseek(fp, 256*y, SEEK_SET);
fread(pinakas, 256, 1, fp);
for (p = 0; p < 256; p++)
printf(" %d", pinakas[p]);
One error in your code is the use of sizeof
: sizeof(pinakas)
is 256
(the size of the array), but sizeof(pinakas[256])
, or any other number is just 1
(the size of any element of the array).