Apply suggestions from code review

Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
This commit is contained in:
ihsinme
2022-03-03 10:14:22 +03:00
committed by GitHub
parent a6654fce4a
commit 1a30b8d467

View File

@@ -48,7 +48,7 @@ int functionWork1b() {
int functionWork2() {
int i = 0;
char a[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
char a[10] = "";
int b = 1;
int *p = &b;
scanf("%i", &i); // GOOD:the error can be determined by examining the initial value.
@@ -61,7 +61,7 @@ int functionWork2_() {
int i;
i = 0;
char a[10];
a[0] = 0;
a[0] = '\0';
int b;
b=1;
int *p = &b;