[讨论]微软考题:Please write a function in C to copy one string to another, w
Please write a function in C to copy one string to another, while return the largest letter in the string. Please do not use any C runtime function.
char StringCopy( char *pszSrc, char *pszDst, int maxSize )
pszSrc: points to the source string
pszDst: points to the target string, where source string will be copied to
maxSize: max. number of characters allowed to be copied
The following code will display “Z”
char sz[100];
char ch;
ch = StringCopy( “Test Zoo”, sz );
printf( ch );
我想知道最简捷的算法
[此贴子已经被作者于2007-9-17 9:30:49编辑过]