The string inversion function strrev is not a standard library function in C language. Many C language compilers do not provide support for it. For example, if you enter the shell command MAN 3 strlen in Linux, the screen will display,
STRLEN(3)
The Strrev function in C + +There is a function strrev in C + +, which reverses the string implementation, but keep in mind that the Strrev function is valid only for character arrays and is not valid for string types.See the code below, where I've
The preceding statement (January 1, March 19, 2006 ):
When I got on the machine three times, I had multiple rounds in the data center. Because no one asked a question, I took the initiative to observe how many students wrote the program, some of
Implementation of C + + Common library function atoi,itoa,strcpy,strcmpC-language string manipulation functions1. String reversal-Strrev2. String copy-strcpy3. String conversion to integer-atoi4. String Length-strlen5. String connection-strcat6.
Overview of C/C ++ header files
# Include // set the insertion point# Include // Character Processing# Include // defines error codes.# Include // floating point number processing# Include // file input/output# Include // parameterized
@ Function name: strdupFunction prototype: char * strdup (const char * s)Function: copy a string. The target space is allocated by the function.Function return: pointer to the copied stringParameter description: src-source string to be copiedFile: #
@ Function name: strdup
Function prototype: char * strdup (const char * s)Function: copy a string. The target space is allocated by the function.Function return: pointer to the copied stringParameter description: Src-source string to be copiedFile:
Function Name: strcpyFunction: copy one string to another.Usage: char * stpcpy (char * Destin, char * Source ); Program Example:# Include # Include Int main (void){Char string [10];Char * str1 = "abcdefghi ";Stpcpy (string, str1 );Printf ("% Sn",
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.