gNash wrote, On 23/04/07 11:49:
> Hi all,
>
> i have some question on memory allocation.. if we use strlen()
> for const string it will give string length because it will count a
> variable upto '\0' character..
Dont' forget that it does not include the nul termination byte, so you
actually have one more byte than strlen reports.
> Is there any way to know the length of dynamically allocated
> memory block..
>
> and malloc(30) how to check 30 bytes has been allocated in memory?
This is question 7.27 of the comp.lang.c FAQ available at
http://c-faq.com/
In future, please check the FAQ before posting, it will save both you
and us time.
--
Flash Gordon