User Defined Types Passing to a Function is a Call By Value in C? -
i have struct , pass struct function. maybe function protype is:
typedef struct {     //bla bla } abc;  void func(abc abc) {  }   this function calling call value or call referance? "c doesnt have copy constructor cant pass user defined types value". idea correct?
call value. c always call value.
(c doesn't have copy constructors structures can still copied creating second structure original structure initializer. function parameters initialized values pass arguments; it's same mechanism @ work.)
Comments
Post a Comment