Monday, 23 October 2023

C PRO 31 : WAP to multiply two numbers using pointers.

 

// Program
#include<stdio.h>
int main()
{
  int x,y,pro,*xp,*yp;
  printf("Enter any 2 values\n");
  scanf("%d%d",&x,&y);
  xp=&x;
  yp=&y;
  pro=*xp**yp;
  printf("Product=%d",pro);
  return 0;
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.