Structure assignment copies values of all members
➜ [...]
struct point {
int x;
int y;
};
struct point a = {1, 2};
struct point b = a;
printf("x = %d, y = %d", b.x, b.y);
// Output: x = 1, y = 2
.
struct point {
int xy[2];
};
struct point a= {{1, 2}};
struct point b= a;
printf("xy[0] = %d, xy[1] = %d", b.xy[0], b.xy[1]);
// Output: xy[0] = 1, xy[1] = 2
Structure assignment copies values of all members
➜ [...]
struct point {
int x;
int y;
};
struct point a = {1, 2};
struct point b = a;
printf("x = %d, y = %d", b.x, b.y);
// Output: x = 1, y = 2
.
struct point {
int xy[2];
};
struct point a= {{1, 2}};
struct point b= a;
printf("xy[0] = %d, xy[1] = %d", b.xy[0], b.xy[1]);
// Output: xy[0] = 1, xy[1] = 2
Structure assignment copies values of all members
➜ [...]
struct point {
int x;
int y;
};
struct point a = {1, 2};
struct point b = a;
printf("x = %d, y = %d", b.x, b.y);
// Output: x = 1, y = 2
.
struct point {
int xy[2];
};
struct point a= {{1, 2}};
struct point b= a;
printf("xy[0] = %d, xy[1] = %d", b.xy[0], b.xy[1]);
// Output: xy[0] = 1, xy[1] = 2
status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|
repetition number in this series | 0 | memorised on | scheduled repetition | ||||
scheduled repetition interval | last repetition or drill |