diff options
Diffstat (limited to 'reference/C/CONTRIB/OR_PRACTICAL_C/09_2.c')
-rw-r--r-- | reference/C/CONTRIB/OR_PRACTICAL_C/09_2.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/reference/C/CONTRIB/OR_PRACTICAL_C/09_2.c b/reference/C/CONTRIB/OR_PRACTICAL_C/09_2.c new file mode 100644 index 0000000..22c4b2d --- /dev/null +++ b/reference/C/CONTRIB/OR_PRACTICAL_C/09_2.c @@ -0,0 +1,15 @@ +#define SIZE 20 /* work on 20 elements */ + +int data[SIZE]; /* some data */ +int twice[SIZE]; /* twice some data */ + +main() +{ + int index; /* index into the data */ + + for (index = 0; index < SIZE; index++) { + data[index] = index; + twice[index] = index * 2; + } + return (0); +} |