home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
pctech
/
feb88.arc
/
BENCH2.C
< prev
next >
Wrap
Text File
|
1983-08-03
|
640b
|
25 lines
#include "stdio.h"
int bench2()
{
int i ;
char s[501] , s2[501] ;
for(i=0 ; i < 500 ; i=i+1 )
{ s[i] = 'a' ; } ;
s[500] = '\0' ;
for( i=0 ; i < 100 ; i=i+1 )
{ scopy(s2,s) ; } ;
}
int scopy(to,from) /* string copy function */
char *to ; /* pointer to destination string */
char *from ; /* pointer to source string */
{
while( (*to++ = *from++) != '\0' ) /* check for end of string */
{ ; } ; /* copy one char and advance ptrs */
}