Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to fined second smallest and largest element
in a given series of elements (without sorting)

Answer Posted / anand

include<stdio.h>
#include<conio.h>
void main()
{
int a[10],max,min,i,temp;
printf("\n enter array element");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
//second smallest number
min=a[0];
for(i=0;i<10;i++)
{
if(min>a[i])
{
min=a[i];
}

Is This Answer Correct ?    4 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if you free a pointer twice?

1027


Should I learn c before c++?

1177


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1626


Why do we need volatile in c?

1118


What is c method?

941


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1104


Is swift based on c?

1053


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1673


Can you define which header file to include at compile time?

982


What is the difference between ā€˜g’ and ā€œgā€ in C?

3911


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1051


Can we declare function inside main?

947


What is the difference between NULL and NUL?

1245


code for quick sort?

1985


What is the description for syntax errors?

1096