I have a school homework to read the partition table from a binary file mbr.bin
root@marlboro ~/fdisk # file mbr.bin
mbr.bin: x86 boot sector, code offset 0x48
http://cs.pub.ro/~programare/Teme_de_casa/tema6/mbr.bin

how can i do that? any ideea can help!

i've tryed

char a[512];
f=fopen("mbr.bin","rb");
fread(a,1,512,f);
but i don't know how to interpret the data from the char array a.
Please pretty please help!