Pointer in C | Call by Reference program 
Pointer in C Output 
Copy Text from below 
#include<stdio.h>
#include<conio.h>
main()
{
    int a,b;
    printf("Enter Value for A and B ");
    scanf("%d%d",&a,&b);
    printf("\n Value before swapping : ");
    printf("\n Value of A is %d ",a);
    printf("\n Value of B is %d ",b);
    swap(&a,&b); //Function call
    printf("\n Value after swapping : ");
    printf("\n Value of A is %d ",a);
    printf("\n Value of B is %d ",b);
}
void swap(int *x,int *y) //Function Define
{
    int t;
    t=*x; //swapping
    *x=*y;
    *y=t;
}
For more program : 
Download pdf file 
If you are interested in 
amazing and Cool facts
Watch this video : 
Subscribe the chennel for
 more Facts and early
 Update 
 
 
 
 
  
 
 
 
 
0 Comments
Post a Comment