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
What is a pragma?
What is c language & why it is used?
What happens if header file is included twice?
Write a program to print numbers from 1 to 100 without using loop in c?
What are the c keywords?
Why header files are used?
Compare interpreters and compilers.
What are the advantages and disadvantages of c language?
What are control structures? What are the different types?
Why is python slower than c?
Explain how can I prevent another program from modifying part of a file that I am modifying?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
Is c is a middle level language?
Where are local variables stored in c?
Is linux written in c?