When a structure is assigned, passed, or returned, the copying is done monolithically....what does this monolithic mean
any example??
It means that every member variable gets copied over.
For example, this C code:
#include <stdio.h>
struct cat {
int id_num;
int age;
int HP;
int MP;
};
int main(void) {
struct cat x;
struct cat y;
x.id_num = 1; x.age = 2; x.HP = 3; x.MP = 4;
y = x;
/* Now y.id_num == 1, y.age == 2, ... */
printf("%d %d %d %d\n", y.id_num, y.age, y.HP, y.MP);
/* Prints "1 2 3 4\n" */
return 0;
}
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Offline 2,478 posts
since Jun 2005