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...

how to find the kth smallest element in the given list of
array elemnts.

Answer Posted / shil

#include <stdio.h>
#include<conio.h>
main()
{
int a[20], i,n;
printf("ent how many elements u want to enter");
scanf("%d",&n);
printf("enter the elements");
for(i=1;i<=n;i++)
scanf("%d",&a[i]));
s=a[1];
for(i=2;i<=n;i++)
{
if
{
s>a[i]
s=a[i]
}
}
printf("the smallest element is %d",s);
}

hope this correct if it is wrong plz let me know

Is This Answer Correct ?    19 Yes 60 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the easiest sorting method to use?

1177


How is actual parameter different from the formal parameter?

1026


Differentiate between a structure and a union.

1293


What is calloc()?

1076


How to compare array with pointer in c?

1113


What is a memory leak? How to avoid it?

1351


What is c++ used for today?

1110


What is void c?

1097


What is an arrays?

1082


What is the symbol indicated the c-preprocessor?

1254


can anyone suggest some site name..where i can get some good data structure puzzles???

2087


What is a method in c?

1154


What are the valid places to have keyword “break”?

1091


Explain how do you print an address?

1146


what is the function of pragma directive in c?

1127