// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <fstream>
#include <cstring>
#include <cstdio>

using namespace std;

int main(int argc,char *argv[])
{
   FILE *fp=fopen("big.dat","rb");
   char buf[1000000];
   int block = atoi(argv[1]);
   long long offset = block;
   offset = offset * 1000000;
   fsetpos(fp,&offset);
   fread(buf,sizeof(buf),1,fp);
   cout << (int)(char)(block % 256) << " " << (int)buf[0] << endl;
   return 0;
}
