Thursday, 21 December 2017

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:



No comments:

Post a Comment

Featured Post

TCS Latest Test Patern ( For On-Campus Drives )

Tata Consultancy Services is software services consulting company whose  headquarter is situated in Mumbai, India. It is the Asia’s larges...