Biggest among Two numbers using Pointers

C-Program to find biggest among two numbers using pointers. 


#include<stdio.h>
#include<conio.h>
int main()
{
int a, b, *big, *xptr, *yptr;
printf("\nEnter two numbers:\n");
scanf("%d%d",&a,&b);
xptr = &a;
yptr = &b;
if(*xptr > *yptr)
big = xptr;
else
big = yptr;
printf("\nBiggest Number is %d\n\n4",*big);

}



OUTPUT:



Post a Comment

0 Comments