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 are terms in math?
What is adt in c programming?
What is typedf?
Write a program to swap two numbers without using the third variable?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
What is break in c?
What is the code in while loop that returns the output of given code?
how many key words availabel in c a) 28 b) 31 c) 32
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is realloc in c?
Explain union.
Explain the concept and use of type void.
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values