Talk:COMP 3000 Lab 4 2012

From Soma-notes
Jump to navigation Jump to search


Question aAbout padding from Part B - question 2:

 Does padding only occur at the end of the file? For example, if our file A is 256 bytes, the padding in file B will make it 512 bytes?
 Also, does a space character count as padding, or should we use null characters? (or are they the same)

It specifically says padded with nulls though. Null is 0 in Ascii. Space is 32 in Ascii. Really, even though it doesn't explicitly say the padding is at the end, it would be absolutely useless to bad elsewhere for most uses.

My understanding about the size was sizeof(B) = sizeof(A) + blocksize - sizeof(A)%blocksize.