Full width home advertisement

Java

Tech News

Ad

  1. #include<stdio.h>
  2. #include<conio.h>
  3.  
  4.  
  5.  
  6. int main(){
  7. int a,b,temp,*p,*q;
  8. printf("Enter two valies");
  9. scanf("%d%d",&a,&b);
  10.  
  11. p=&a;
  12. q=&b;
  13. temp=*p;
  14. *p=*q;
  15. *q=temp;
  16. printf("The swapped values are %d %d",*p,*q);
  17.  
  18. return 0;
  19. }
  20.  

No comments:

Post a Comment

Bottom Ad [Post Page]