how can you pass a struct by reference in


How can you pass a struct by reference in e? 

 The question is phrased in a tricky way because passing by reference is the default and only possible way to pass structs in e. In other words, each time you call a method with a struct parameter, the method gets the original copy, and any modifications it does will persist even after it returns. To pass a struct by value you can use deep_copy() to clone it. In C/C++ you could stop a calling function from modifying a parameter by explaining that function parameter as const. It is too bad that doesn't support const as well...   

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: how can you pass a struct by reference in
Reference No:- TGS0355898

Expected delivery within 24 Hours