Anonymous user
Compare a list of strings: Difference between revisions
→{{header|C}}: reduce number of variables, fix types, sprinkle const
(→{{header|C}}: reduce number of variables, fix types, sprinkle const) |
|||
Line 537:
=={{header|C}}==
<lang c>#include <
#include <string.h>
static bool
{
for (size_t i = 1; i < nstrings; i++)
return false;
▲ return result;
}
static bool
{
for (size_t i = 1; i < nstrings; i++)
return false;
▲ result = (0 >= strcmp(*(strings+k-1), *(strings+k)));
▲ return result;
}</lang>
|