#include<stdio.h>
#include<conio.h>
void main()
{
int a[20],i,*p;
clrscr();
printf("\nEnter the array elements:
");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
p=&a[0];
p=a;
for(i=0;i<10;i++)
{
if(*p>a[i])
{
*p=a[i];
}
}
printf("\nThe smallest value of given
array is: %d",*p);
getch();
}
//OUTPUT:
//Enter the array
elements: 12
//23
//43
//11
//24
//65
//67
//89
//87
//54
//The smallest
value of given array is: 11
From this array how will we print the cube of numbers placed at odd subscript position???
ReplyDelete