home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_02_05
/
2n05062b
< prev
next >
Wrap
Text File
|
1991-03-27
|
385b
|
32 lines
#include <stdio.h>
char s[40000];
int strlen(const char s[])
{
int i = 0;
while (s[i] != '\0')
++i;
#ifdef DEBUG
printf("%d\n", i);
#endif
return i;
}
int main(void)
{
unsigned i;
for (i = 0; i < 40000; ++i)
s[i] = 'x';
s[38000] = '\0';
printf("%u\n", strlen(s));
return 0;
}