- Function Strcmp En Dev C Vs
- Function Strcmp En Dev C S En Dev C++ Ejemplos
- Function Strcmp En Dev C Windows 7
Strcmp in C/C strcmp is a built-in library function and is declared in header file. This function takes two strings as arguments and compare these two strings lexicographically. I am just trying to learn how to use c and one thing that I am trying to make is a yes or no choice 'choose y to continue choose n to exit' kinda thing I.
< C++ Programming | Code/Standard C Library | Functions
Function Strcmp En Dev C Vs
strcmp[edit]
Syntax |
Function Strcmp En Dev C S En Dev C++ Ejemplos
The function strcmp() compares str1 and str2, then returns:
Return value | Explanation |
---|---|
less than 0 | str1 is less than str2 |
equal to 0 | str1 is equal to str2 |
greater than 0 | str1 is greater than str2 |
Function Strcmp En Dev C Windows 7
For example:
Note that if str1 or str2 are missing a null-termination character, then strcmp() may not produce valid results. For a similar (and safer) function that includes explicit bounds checking, see strncmp().
- Related topics
- memcmp - strcat - strchr - strcoll - strcpy - strlen - strncmp - strxfrm
Retrieved from 'https://en.wikibooks.org/w/index.php?title=C%2B%2B_Programming/Code/Standard_C_Library/Functions/strcmp&oldid=3676192'