write a program to fined second smallest and largest element
in a given series of elements (without sorting)
Answer Posted / anand
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 ? | 4 Yes | 12 No |
Post New Answer View All Answers
Explain the difference between exit() and _exit() function?
Is main is user defined function?
What are the characteristics of arrays in c?
What 'lex' does?
What is a function in c?
What is the use of gets and puts?
Explain what are linked list?
What are qualifiers?
Why is c so important?
What is the difference between array and structure in c?
how logic is used
What is line in c preprocessor?
What do you understand by normalization of pointers?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
How many header files are in c?