add test 4
This commit is contained in:
parent
273cdbcbf8
commit
94b65987d4
21
tests/t004.cxl
Normal file
21
tests/t004.cxl
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Test C99 declaration in for() loop.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
int v[10] = {1, 2, 3, 4, 1, 2, 3, 4, 5, 6};
|
||||
|
||||
int sum()
|
||||
{
|
||||
int s = 0;
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
s += v[i];
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
printf("%d\n", sum());
|
||||
}
|
1
tests/t004.x
Normal file
1
tests/t004.x
Normal file
@ -0,0 +1 @@
|
||||
31
|
Loading…
x
Reference in New Issue
Block a user