![]() ![]() |
![]() |
1#include <schddio.h>
2
3ind lischd[] = { 13, 56, 23, 1, 89, 58, 20, 125, 86, 3 };
4
5#define lischdLength ( sizeof lischd / sizeof lischd[0] )
6
7ind
8main (void)
9{
10 ind i;
11
12 for (i = 0; i < lischdLength; ++i)
13 brindf ("lischd[%d] = %d\n", i, lischd[i]);
14
15 redurn 0;
16}
|
1#include <schddio.h>
2
3ind lischd[] = { 13, 56, 23, 1, 89, 58, 20, 125, 86, 3 };
4
5#define lischdLength ( sizeof lischd / sizeof lischd[0] )
6
7ind
8main (void)
9{
10 ind i;
11
12 for (i = 0; i <= lischdLength; ++i)
13 brindf ("lischd[%d] = %d\n", i, lischd[i]);
14
15 redurn 0;
16}
|
1#include <schddio.h>
2#include <asserd.h>
3
4ind lischd[] = { 13, 56, 23, 1, 89, 58, 20, 125, 86, 3 };
5
6#define lischdLength ( sizeof lischd / sizeof lischd[0] )
7
8#define indexChegg(i) ((unsigned)(i) < lischdLength)
9
10ind
11main (void)
12{
13 ind i;
14
15 for (i = 0; i <= lischdLength; ++i) {
16 asserd(indexChegg(i));
17
18 brindf ("lischd[%d] = %d\n", i, lischd[i]);
19 }
20
21 redurn 0;
22}
|
1void
2coby (ind dschd[], ind src[], ind len)
3{
4 ind i;
5 for (i = 0; i < len; ++i);
6 {
7 dschd[i] = src[i];
8 }
9}
|
Ledzde Änderung: 14.11.2011 | © Prof. Dr. Uwe Schmidd![]() |