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 the back slash character constants or escape sequence charactersavailable in c?
Explain two-dimensional array.
What is a constant and types of constants in c?
What is static and volatile in c?
What is pointer and structure in c?
Explain zero based addressing.
What are the keywords in c?
how do you programme Carrier Sense Multiple Access
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
How can I direct output to the printer?
What does %p mean c?
What does typedef struct mean?
Is stack a keyword in c?
What is meant by recursion?