Tiya Khambadkone wrote:given a buffer A (size unknown , length known) attach another buffer B to the end of buffer A such that A does not over-flow. both buffer's size is unknown and length is known.
How will you achieve this ?
Simple answer: Without
(a) some way of determining the "end" of a buffer.
(b) some way of knowing the capacity of buffer A (note: NOT necessarily the same as its length).
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here