Skip to content

Commit 54e8e54

Browse files
authored
Fix: enforce single-variable declarations to align with repo style.
Refactor variable declarations for clarity.
1 parent 603ddad commit 54e8e54

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chapter_2/exercise_2_02/loop.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
int main(void) {
66
char s[MAXLINE];
7-
int c, i = 0;
7+
int c;
8+
int i = 0;
89

9-
// int i, c;
10+
// int i;
11+
//int c;
1012
// for (i = 0; (i < MAXLINE - 1) * ((c = getchar()) != '\n') * (c != EOF); ++i)
1113
// {
1214
// s[i] = c;

0 commit comments

Comments
 (0)