Function does work,like I hoped ... char *swapdata (char *destination, char *SourceLine) { char *temp; temp=SourceLine; SourceLine=destination; destination=temp; printf("in function string = %s - %s\n",destination,SourceLine); return temp; } void main(void) { char *p_test1,*p_test2; char test1[] ="test 1"; char test2[] ="test 2"; result[128]; p_test1 = test1; p_test2 = test2; printf("string = %s - %s - %s\n",p_test1,p_test2,result); result=swapdata(p_test1,p_test2); printf("string = %s - %s - %s\n",p_test1,p_test2,result); } Function does not swap ??? Best regards