Monday, April 8, 2013

//wap to add two no by pointer



Adding two numbers using 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