#include<stdio.h>
#include<conio.h>
void main()
{
int a[20],i,d;
int *ptr,*big=0;
clrscr();
printf(" \n Enter dimension : ");
scanf("%d",&d);
printf(" \n Enter %d values : ",d);
for(i=0;i<d;i++)
scanf("%d",&a[i]);
ptr=a;
for(i=0;i<d;i++)
{
if(*big < *ptr)
*big=*ptr;
if(*low<*ptr)
*low=*ptr;
ptr++;
}
printf("\n Elements of Array a : \n");
for(i=0;i<d;i++)
printf("%d\t",a[i]);
printf("\n The biggest value Of ARRAy : %d",*big);
printf("\n The lowest value of ARRAy : %d",*low);
getch();
}
#include<conio.h>
void main()
{
int a[20],i,d;
int *ptr,*big=0;
clrscr();
printf(" \n Enter dimension : ");
scanf("%d",&d);
printf(" \n Enter %d values : ",d);
for(i=0;i<d;i++)
scanf("%d",&a[i]);
ptr=a;
for(i=0;i<d;i++)
{
if(*big < *ptr)
*big=*ptr;
if(*low<*ptr)
*low=*ptr;
ptr++;
}
printf("\n Elements of Array a : \n");
for(i=0;i<d;i++)
printf("%d\t",a[i]);
printf("\n The biggest value Of ARRAy : %d",*big);
printf("\n The lowest value of ARRAy : %d",*low);
getch();
}