Quote:
Originally Posted by cuxxie
int strlen(char * sz)
{
if((*sz)!='\0') return (strlen(++sz)+1);
else return 0;
}
string length counter... 2 lines.. 
|
Technically, that is 4 logical lines of code. Otherwise we could do this and call it one line of code.
Code:
int strlen(char * sz)
{
if((*sz)!='\0') return (strlen(++sz)+1); else return 0;
}