17. WAP to enter any two numbers and display total using of pointer.
void main()
{
int n1,n2,*no1,*no2,*t;
clrscr();
printf("enter 2 no:");
scanf("%d%d",&n1,&n2);
no1=&n1;
no2=&n2;
*t=*no1+*no2;
printf("\ntot:%d",*t);
getch();
}
{
int n1,n2,*no1,*no2,*t;
clrscr();
printf("enter 2 no:");
scanf("%d%d",&n1,&n2);
no1=&n1;
no2=&n2;
*t=*no1+*no2;
printf("\ntot:%d",*t);
getch();
}
17. WAP to enter any two numbers and display total using of pointer.
Reviewed by Unknown
on
21:26:00
Rating:
No comments: