summation of two variable using pointer
#include<stdio.h>
#include<conio.h>
int sum()
{
int sum=0;,*x,*y;
printf("\n enter the value to be added=");
scanf("%d%d",x,y);
sum=(*x)+(*y);
printf("\n result=%d",sum);
return() 0;
}
void main()
{
clrscr();
sum();
getch();
}
#include<stdio.h>
#include<conio.h>
int sum()
{
int sum=0;,*x,*y;
printf("\n enter the value to be added=");
scanf("%d%d",x,y);
sum=(*x)+(*y);
printf("\n result=%d",sum);
return() 0;
}
void main()
{
clrscr();
sum();
getch();
}
No comments:
Post a Comment