View Single Post
Old 01-16-2011, 09:21 AM   #9
yaustar
Administrator
 
yaustar's Avatar

Activity Longevity
2/20 19/20
Today Posts
2/11 sssss2263
Location: UK
Default

Quote:
Originally Posted by cuxxie View Post
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;
}
yaustar is offline