C statements to calculate the information about cylinder

Asked By 0 points N/A Posted on -
qa-featured

In data part of MBR, 66 bytes are used to represent the four different partitions in the chunks of 16 bytes each. In each chunk of 16 bytes 3rd and 4th bytes are used to hold the information about cylinder No. Write the C statements to calculate the information about cylinder No from these two bytes.

SHARE
Best Answer by James20
Best Answer
Best Answer
Answered By 5 points N/A #95847

C statements to calculate the information about cylinder

qa-featured

Hi,

You can check this material i hope this will be helpful for you

  1. Unsigned int temp = 0 ;
  2. Unsignedint  StartCylinderNo = 0;
  3. temp = ThirdByte;
  4. temp = temp << 2 ; // shift bit # 6 & 7 in higher byte.
  5. StartCylinderNo = FourthByte;
  6. *  ( (  (unsigned char *) (& StartCylinderNo)  ) + 1 )  =   *  (  (  (unsigned char *) (& temp)  )  + 1 )  ;

Related Questions