equal
deleted
inserted
replaced
12 |
12 |
13 int main (int argc, char **argv) |
13 int main (int argc, char **argv) |
14 { |
14 { |
15 char line[83]; |
15 char line[83]; |
16 char *token; |
16 char *token; |
17 int i; |
|
18 |
17 |
19 if (argc != 4) { |
18 if (argc != 4) { |
20 printf ("Usage: %s (char*)string (char*)delim1 (char*)delim2\n", argv[0]); |
19 printf ("Usage: %s (char*)string (char*)delim1 (char*)delim2\n", argv[0]); |
21 return 0; |
20 return 0; |
22 } |
21 } |
28 while (token) { |
27 while (token) { |
29 printf ("TOKEN: %s\n", token); |
28 printf ("TOKEN: %s\n", token); |
30 token = strtok (NULL, argv[3]); |
29 token = strtok (NULL, argv[3]); |
31 } |
30 } |
32 |
31 |
33 i = 0; |
32 printf ("\nTest finished\n"); |
34 printf ("while i++ <5: "); |
|
35 while (i++ < 5) |
|
36 printf ("%d ", i); |
|
37 |
33 |
38 i = 0; |
34 return EXIT_SUCCESS; |
39 printf ("\nwhile ++i <5: "); |
|
40 while (++i < 5) |
|
41 printf ("%d ", i); |
|
42 |
|
43 i = 0; |
|
44 printf ("\nwhile i <5 : "); |
|
45 while (i < 5) |
|
46 printf ("%d ", i++); |
|
47 |
|
48 i = 0; |
|
49 printf ("\nwhile i <5 : "); |
|
50 while (i < 5) |
|
51 printf ("%d ", ++i); |
|
52 |
|
53 printf ("\nTest finished\n"); |
|
54 return 0; |
|
55 } |
35 } |