We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d50ea33 commit 2c1b8e6Copy full SHA for 2c1b8e6
chapter_4/exercise_4_13/reverse.c
@@ -27,11 +27,13 @@ void reverse(char str[])
27
28
str[j++] = c;
29
}
30
- if (str[j] == '\0') // if whole reverse process is complete, reset the static variables to make this function reusable
+
31
+ // if whole reverse process is complete, reset the static variables to make this function reusable
32
+ if (str[j] == '\0')
33
{
- i = 0;
- j = 0;
34
- }
+ i = 0;
35
+ j = 0;
36
+ }
37
38
39
// NOTE: As a simple observation when recursive functions are used, static
0 commit comments