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
Explain about C function prototype?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
What is the general form of a C program?
How can I find out the size of a file, prior to reading it in?
Is linux written in c?
What is the difference between break and continue?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
How is a pointer variable declared?
Explain heap and queue.
What is string function in c?
Why is main function so important?
What does return 1 means in c?
What are the types of unary operators?
What does c mean?
How do we declare variables in c?