Skip to content

Commit b75908d

Browse files
committed
initializing arrays
1 parent 55433fb commit b75908d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

prog.7.5.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <stdio.h>
2+
3+
int main (void)
4+
{
5+
int array_values[10] = { 0, 1, 4, 9, 16 };
6+
int i;
7+
8+
for ( i = 5; i < 10; ++i )
9+
array_values[i] = i * i;
10+
11+
for ( i = 0; i < 10; ++i )
12+
printf ("array_values[%i] = %i\n", i, array_values[i]);
13+
14+
return 0;
15+
}

0 commit comments

Comments
 (0)