Tuesday, 17 September 2013

Get data by Return vs passing pointer

Get data by Return vs passing pointer

int get1(void) { return test; }
void get2(int* arg) { *arg = test;}
static test = 5;
int main()
{
int result = 0;
result = get1();
get2(&result);
}
get1 vs get2 which one is best performance for embedded system

No comments:

Post a Comment