C Program to Find Product of Numbers Using Pointers

In this program, you will learn to find product of numbers using pointers. The pointer is a variable which stores the address of another variable. This variable can be of type int, char, array, function, or any other pointer. The size of the pointer depends on the architecture. However, in 32-bit architecture the size of a pointer is 2 byte.

Source Code
void main()
    int *p1,*p2, n1, n2, mul;
    printf("Enter first no. : ");
    printf("Enter second no. : ");
    p1 = &n1;
    p2 = &n2;
    mul=(*p1) * (*p2);
    printf("\nMultiplication is %d", mul);
Enter first no. : 12
Enter second no. : 6

Multiplication is 72

"Coding Hub - Learn to code" app now available on Google Play Store