C - Functions - Discussion
You Are Here :: Home > C > Functions - Discussion
#incude int main(){ int a=5,b=10; swap(&a,&b); printf("%d %d",a,b); return 0; } void swap(int *a,int *b){ int *temp; *temp =*a;
Pass by reference: In this approach we pass memory address actual variables in function as a parameter. Hence any modification on parameters inside the function will reflect in the actual variable.
Discussion