Raj jyotee DuttaPhookan wrote:
> Hi Bill, thats true that '\0' is invisibly stored at the end of an array in C 
> which often helps to know the end of the array. But I think the printf( ) 
> function does not take into account of this while returning the number of 
> characters in the array. Once I removed \n from the string, it was correctly 
> returning 11.

It was correctly returning 12 before as well.  Computers obey every 
single instruction with perfect obedience - even if some instruction 
causes an application crash, the computer will even execute the crash 
perfectly since that is clearly what you wanted it to do.

The computer is hereby the perfect wife/husband that everyone is looking 
for.  Cheap too.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to