strcmp
compare strings
Synopsis
#include <string.h>
int strcmp(const char *s1, const char *s2);
Description
The
function lexicographically compares the null-terminated
strcmp
strings pointed to by
is greater than the
the
string, and a zero if the strings are the same.
s1
Error Conditions
The
function does not return an error condition.
strcmp
Example
#include <string.h>
char string1[50], string2[50];
if (strcmp(string1, string2))
printf("%s is different than %s \n", string1, string2);
See Also
memcmp,
strncmp
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
and
. It returns a positive value if the
s1
s2
string, a negative value if the
s2
C/C++ Run-Time Library
string is greater than
s2
string
s1
3-123
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers