C++ lets you pass a structure by value and it lets you pass the address of a structure. If sample is a structure variable, how would you pass it by value? How would you pass its address? Which method do you think is better?
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If we assume structure variable name as sample and function name as sample_function() then:
void sample_function(struct SAMPLE sample)
:
:
}
sample_function(&sample);
void sample_function(struct SAMPLE *sample)
{
:
:
}
Both the method have their own importance, so as per the program requirement we can use any of them.