mirror of
https://github.com/kmc7468/cs420.git
synced 2026-11-04 00:00:29 +09:00
Update skeleton
This commit is contained in:
1 parent
62c5208631
commit
7bb9ed11b5
123 files changed
+49554
-868
No files matched your search
@@ -0,0 +1,24 @@
|
||||
struct Sub {
|
||||
long m1;
|
||||
long m2;
|
||||
long m3;
|
||||
long m4;
|
||||
};
|
||||
|
||||
struct Big {
|
||||
struct Sub m1;
|
||||
struct Sub m2;
|
||||
struct Sub m3;
|
||||
};
|
||||
|
||||
struct Big foo(struct Big p1) {
|
||||
struct Big r = p1;
|
||||
r.m1.m1 = 10;
|
||||
return r;
|
||||
}
|
||||
|
||||
int main() {
|
||||
struct Big a = {{1, 2, 3, 4}, {2, 3, 4, 5}, {3, 4, 5, 6}};
|
||||
struct Big r = foo(a);
|
||||
return r.m1.m1 == 10;
|
||||
}
|
||||
Reference in new issue
Block a user