sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 1 | |
2 | #include <string.h> | ||||
3 | #include <stdio.h> | ||||
njn25 | e49d8e7 | 2002-09-23 09:36:25 +0000 | [diff] [blame] | 4 | #include <stdlib.h> |
sewardj | de4a1d0 | 2002-03-22 01:27:54 +0000 | [diff] [blame] | 5 | |
6 | char* s1; | ||||
7 | char* s2; | ||||
8 | |||||
9 | int main ( void ) | ||||
10 | { | ||||
11 | s1 = malloc(10); strcpy(s1,"fooble"); | ||||
12 | s2 = malloc(10); strcpy(s2,"fooble"); | ||||
13 | if (memcmp(s1, s2, 8) != 0) | ||||
14 | printf("different\n"); | ||||
15 | else | ||||
16 | printf("same (?!)\n"); | ||||
17 | return 0; | ||||
18 | } | ||||
19 | |||||
20 |