Saturday, March 30, 2013

Program to add two no by pointer .


#include<stdio.h>
#include<conio.h>
  main()
{ int a,b,*pa,*pb;
//a=10,b=20;
pa=&a;
pb=&b;
printf("input 2 no ");
scanf("%d%d",pa,pb);
printf("\n sum=%d",*pa+*pb);
getch();
}

No comments:

Post a Comment