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


Please Help Members By Posting Answers For Below Questions

Which is best linux os?

656


p*=(++q)++*--p when p=q=1 while(q<=6)

1345


When do we get logical errors?

724


how to capitalise first letter of each word in a given string?

1529


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

852






What are the different types of errors?

723


Explain how can I read and write comma-delimited text?

780


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

885


What is .obj file in c?

738


how we can make 3d venturing graphics on outer interface

4168


What is the use of getch ()?

726


Why c is called a mid level programming language?

695


Explain why C language is procedural?

859


How can I read data from data files with particular formats?

703


What is the use of the function in c?

694