write a program to fined second smallest and largest element
in a given series of elements (without sorting)
Answer Posted / mohit kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],max,min,i,temp;
printf("\n enter array element");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
//second smallest number
min=a[0];
for(i=0;i<10;i++)
{
if(min>a[i])
{
min=a[i];
}
Is This Answer Correct ? | 20 Yes | 39 No |
Post New Answer View All Answers
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is NULL pointer?
can we implement multi-threads in c.
Explain two-dimensional array.
Can we declare variable anywhere in c?
Do array subscripts always start with zero?
Why static is used in c?
How to explain the final year project as a fresher please answer with sample project
What are header files? What are their uses?
develop algorithms to add polynomials (i) in one variable
Does c have class?
Write a program of prime number using recursion.
What are the different data types in C?
Explain what are preprocessor directives?
Explain the red-black trees?