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 is c preprocessor mean?

1256


Why cant I open a file by its explicit path?

998


Difference between Function to pointer and pointer to function

1032


Where is c used?

1043


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15741


i want to know the procedure of qualcomm for getting a job through offcampus

2422


Write a code to remove duplicates in a string.

990


Explain how can I read and write comma-delimited text?

1123


Where are local variables stored in c?

993


What are the key features in c programming language?

1021


What is the full form of getch?

1201


Apart from dennis ritchie who the other person who contributed in design of c language.

1336


How can you increase the size of a dynamically allocated array?

1146


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1090


Is there any data type in c with variable size?

1046