Write a program to find the product of two numbers using pointers

//this is a program to find the product of two numbers using pointers
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b;
int *ptr1,*ptr2;

ptr1=&a;
ptr2=&b;

printf("\n\nEnter any two numbers: ");
scanf("%d%d",ptr1,ptr2);

printf("\n\nVales of A=%d And B=%d",*ptr1,*ptr2);
printf("\n\nTheir Multiplication=%d",(*ptr1)*(*ptr2));

getch();
}

Previous
Next Post »