Interview Questions

So can I query the malloc package to find out how big an allocated block is?

C Interview Questions and Answers


(Continued from previous question...)

So can I query the malloc package to find out how big an allocated block is?

Unfortunately, there is no standard or portable way. (Some compilers provide nonstandard extensions.) If you need to know, you'll have to keep track of it yourself.

(Continued on next question...)

Other Interview Questions