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
What is the easiest sorting method to use?
How is actual parameter different from the formal parameter?
Differentiate between a structure and a union.
What is calloc()?
How to compare array with pointer in c?
What is a memory leak? How to avoid it?
What is c++ used for today?
What is void c?
What is an arrays?
What is the symbol indicated the c-preprocessor?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is a method in c?
What are the valid places to have keyword “break”?
Explain how do you print an address?
what is the function of pragma directive in c?