-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ImportC add simple array initialization
- Loading branch information
1 parent
f1692f5
commit a9efb98
Showing
3 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
int printf(const char *, ...); | ||
void exit(int); | ||
|
||
void test1() | ||
{ | ||
static int a[3] = {1, 2, 3}; | ||
if (a[0] != 1 || | ||
a[1] != 2 || | ||
a[2] != 3) | ||
{ | ||
printf("error 1\n"); | ||
exit(1); | ||
} | ||
} | ||
|
||
int main() | ||
{ | ||
test1(); | ||
return 0; | ||
} | ||
|