A
aarklon
Hi all,
I was going through the book Test your C skills by "Test your C
skills" by Yashavant p. Kanetkar,ISBN 81-7029-801-6
I have got the following doubts ,questions...???
1)On shifting, the bits from the left are rotated and brought to the
right and accomodated where there is empty space on the right.
the reader is asked to tell if this statement is true or not???
The answer is given as false, when i discussed with my friends they
told me that correct answer is implementation dependent.
well what is the correct answer...???
2) To free() we only pass the pointer to the block of memory which we
want to deallocate.Then how does free() know how many bytes it should
deallocate()...???
the answer is given as follows:-
In most implementations of malloc() the number of bytes allocated
is stored adjacent to the allocated block.Hence it is simple for
free() to know how many bytes to deallocate().
To what extent this answer is true...???
I was going through the book Test your C skills by "Test your C
skills" by Yashavant p. Kanetkar,ISBN 81-7029-801-6
I have got the following doubts ,questions...???
1)On shifting, the bits from the left are rotated and brought to the
right and accomodated where there is empty space on the right.
the reader is asked to tell if this statement is true or not???
The answer is given as false, when i discussed with my friends they
told me that correct answer is implementation dependent.
well what is the correct answer...???
2) To free() we only pass the pointer to the block of memory which we
want to deallocate.Then how does free() know how many bytes it should
deallocate()...???
the answer is given as follows:-
In most implementations of malloc() the number of bytes allocated
is stored adjacent to the allocated block.Hence it is simple for
free() to know how many bytes to deallocate().
To what extent this answer is true...???