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

Explain the difference between the local variable and global variable in c?

1133


what do you mean by inline function in C?

1100


What are keywords c?

1091


How do you write a program which produces its own source code as output?

1174


How do you convert strings to numbers in C?

1296


What is nested structure?

1096


Explain how can I remove the trailing spaces from a string?

1104


What are integer variable, floating-point variable and character variable?

1298


Explain the Difference between the New and Malloc keyword.

1187


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1373


What is call by reference in functions?

1538


Write the Program to reverse a string using pointers.

1073


Where does the name "C" come from, anyway?

1215


List some basic data types in c?

1082


Who is the founder of c language?

1222