Skip to content

Commit e892a13

Browse files
Update strindex.c
1 parent 2ce77df commit e892a13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chapter_5/exercise_5_06/strindex.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ int strindex(char *s, char *t);
55
int main(void)
66
{
77
char s[] = "this is first string";
8-
char t[] = "this";
8+
char t[] = "this";
99

1010
printf("%d", strindex(s, t));
1111

@@ -18,7 +18,7 @@ int strindex(char *s, char *t)
1818
char *second;
1919
int pos = 0;
2020

21-
while (*s != '\0')
21+
while (*s != '\0')
2222
{
2323
if (*s == *t)
2424
{

0 commit comments

Comments
 (0)