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.
2 parents 7a45948 + d2de3d7 commit 4c99fedCopy full SHA for 4c99fed
chapter_5/exercise_5_06/getop.c
@@ -22,7 +22,7 @@ int getop(char *s)
22
char c;
23
24
// Skip blanks (spaces and tabs)
25
- while ((*s = c = getchar()) != ' ' || c != '\t')
+ while ((*s = c = getchar()) == ' ' || c == '\t')
26
;
27
28
*(s + 1) = '\0';
0 commit comments