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
Which is best linux os?
p*=(++q)++*--p when p=q=1 while(q<=6)
When do we get logical errors?
how to capitalise first letter of each word in a given string?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What are the different types of errors?
Explain how can I read and write comma-delimited text?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is .obj file in c?
how we can make 3d venturing graphics on outer interface
What is the use of getch ()?
Why c is called a mid level programming language?
Explain why C language is procedural?
How can I read data from data files with particular formats?
What is the use of the function in c?