mirror of
https://github.com/cc65/cc65.git
synced 2024-11-12 07:07:19 +00:00
25 lines
402 B
C
25 lines
402 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
static const char S1[] = {
|
|
'h', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '\0', 'A'
|
|
};
|
|
|
|
static const char S2[] = {
|
|
'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\0', 'B'
|
|
};
|
|
|
|
|
|
|
|
|
|
int main (void)
|
|
{
|
|
char I;
|
|
for (I = 0; I < 20; ++I) {
|
|
printf ("%02d: %d\n", I, strncmp (S1, S2, I));
|
|
}
|
|
return 0;
|
|
}
|
|
|