Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, March 11, 2015

What is strcmp() function ?

The strcmp() function is used to compare two strings and it return a value, if both strings are equal it will return zero (0).
The stcmp() function compare strings character by character. When arguments (characters ) of the second string is greater than the first string than it return will negative value (-1). When arguments (characters ) of the second string is less than the first string than it will return positive value (-1).
sy:
strcmp( string1, string2 );
Ex: strcmp ( str1, str2);
strcmp ( str1, “hello” );

strcmp( “ hello”, “hello” ); 

No comments:

Post a Comment