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 / sumesh

#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i,s,c=0; clrscr();
printf("enter the elements in the list :\n");
for(i=0;i<=9;i++)
{
scanf("%d",&a[i]);
}
s=a[0];
for(i=1;i<=9;i++)
{
if(s>a[i])
{
s=a[i];
c++;
break;
}
}
printf("small is\t %d\nfound on\t %d\n",s,c+1);
getch();
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why string is used in c?

991


What is a rvalue?

1187


What is the difference between array and linked list in c?

1134


Is python a c language?

988


Why do we need a structure?

1023


What does int main () mean?

1004


what are the 10 different models of writing an addition program in C language?

1882


What are the header files used in c language?

1036


int far *near * p; means

3539


Can stdout be forced to print somewhere other than the screen?

1037


What is a function in c?

1552


What is the difference between procedural and functional programming?

1060


Can you return null in c?

1143


What is sizeof return in c?

1022


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1124