Finding The Smallest Element In An Array C program Tamil


//to find Smallest Element using pointer in an Array
#include<stdio.h>
#include<conio.h>
void main()
{
	int arr[10],i,n;
	clrscr();	//It clears the output Screen
	printf("\n Enter 10 Values :");
		for(i=0;i<=9;i++)
		{
			scanf("%d",&arr[i]);
		}
	n=*arr;
	for(i=0;i<=9;i++)
	{
		if(*(arr+i)<n)
			n=*(arr+i);    // www.tutorjoes.com
	}
	printf("\n Smallest Element in Array :%d",n);
	getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming