Home > Back-end >  Big help! Big help! Big help! Big help!
Big help! Big help! Big help! Big help!

Time:11-13

Didn't contact with C language, leading to a problem, won't make a day, hope to give an answer, thank you!

1. Design an int StrLen (const char * Str) function, calculation of parameters of Str refers to the length of the string, not including the ending character '\ 0',
2. Design an int the SubString (const char * Str, char * Sub, unsigned int Beginldx, unsigned int Len) function, pointed to the Str string starting Beginldx Len characters, copied into Sub points to the space, adding the end operator (callback function to Sub for good storage space distribution) in advance, if the Str from Beginldx to end operator Len enough length, return a value of 1, otherwise, the return value is zero?
3. Design an int Search (const char * Str, const char * Sub) function, in the Str string Search Sub string, if found, the first character of a return to Sub indices in Str, or return 1, requirements must be implemented through a call to the first two functions,
4. The first three function in a c files and h files,
5. The main function to realize from the keyboard to receive two strings, and perform the first string in the Search for the second string of function calls, output line Search return values, request input may contain Spaces, per line input length less than 80 characters,
  • Related