C String Functions
- possible implementation of operator <<()
ostream& operator << (ostream& os, char* str)
{
while (*str != '\0')
{
os.put(*str);
++str;
}
return os;
}
How is assumption of null-termination used ?
How is assumption of memory allocation used?
What happens if assumptions are not valid?