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
How main function is called in c?
What is strcmp in c?
What are unions in c?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
Under what circumstances does a name clash occur?
What is an arrays?
Can we replace the struct function in tree syntax with a union?
What is the easiest sorting method to use?
Explain what is the difference between text files and binary files?
Is there any data type in c with variable size?
please explain every phase in the "SDLC" in the dotnet.
Is stack a keyword in c?
how to construct a simulator keeping the logical boolean gates in c
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is the correct code to have following output in c using nested for loop?