Pointer Program Using Function (Pass By Reference) C Programming Home » C Pointers » Pointer Program Using Function (Pass By Reference) /*Pointer Program Using Function (Pass By Reference) */ #include #include void main() { int a,b; void interchange(int *, int *); printf("\n\n/*Pointer Program Using Function (Pass By Reference) */\n\n"); printf("\nEnter the First No."); scanf("%d",&a); printf("\nEnter the Second No."); scanf("%d",&b); interchange(&a,&b); getch(); } void interchange(int *x, int *y) { int t; t = *x; *x = *y; *y = t; printf("\nA=%d \n B=%d", *x,*y); } Tweet Share Share Share Share Related Post
ConversionConversion EmoticonEmoticon