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 the local variable and global variable in c?
what do you mean by inline function in C?
What are keywords c?
How do you write a program which produces its own source code as output?
How do you convert strings to numbers in C?
What is nested structure?
Explain how can I remove the trailing spaces from a string?
What are integer variable, floating-point variable and character variable?
Explain the Difference between the New and Malloc keyword.
Is it possible to use curly brackets ({}) to enclose single line code in c program?
What is call by reference in functions?
Write the Program to reverse a string using pointers.
Where does the name "C" come from, anyway?
List some basic data types in c?
Who is the founder of c language?