Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct base_type_test{
- int a;
- int b;
- char arr[10];
- };
- struct nested_struct_1{
- int a;
- struct base_type_test nested_base;
- };
- struct nested_struct_2{
- struct nested_struct_1 first;
- int normal_int;
- };
- // should return as size 4
- struct nested_struct_2 var_double_nested_struct;
- struct nested_struct_2 get_tim(){
- struct nested_struct_2 tim;
- tim.first.nested_base.arr[2] = '@';
- return tim;
- }
- int main(){
- struct nested_struct_2 dave;
- //dave.first.nested_base.arr[2] = '#';
- print_c(get_tim().first.nested_base.arr[2]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement