C does not support links or passes by reference. Instead, you should use pointers and pass to the address. Passing by value is effective for primitive types, but makes a shallow copy for structures.
In C ++, it makes a lot of sense to pass objects by reference to increase efficiency. It can save a ton of copying and calling constructors / destructors when defining copy constructors. For large data objects (for example std::list), it is impractical to pass by value, since the list will be copied during the transfer. Here you must follow the link.
source
share