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
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What are local variables c?
Why does not c have an exponentiation operator?
Is c pass by value or reference?
Can you mix old-style and new-style function syntax?
What is FIFO?
How can I write functions that take a variable number of arguments?
What does 2n 4c mean?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
Did c have any year 2000 problems?
What is the use of getch ()?
What is the process to generate random numbers in c programming language?
how do you execute a c program in unix.
How can type-insensitive macros be created?
How can this be legal c?