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 usage of the pointer in c?
What is selection sort in c?
What is difference between stdio h and conio h?
What the advantages of using Unions?
What do you mean by Recursion Function?
What is the size of array float a(10)?
Explain the use of fflush() function?
Is null always equal to 0(zero)?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is dynamic variable in c?
How are structure passing and returning implemented?
What is pointer to pointer in c language?
What does typeof return in c?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
What is malloc() function?