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
What is the use of the function in c?
How can you increase the size of a dynamically allocated array?
What are the advantages and disadvantages of c language?
Do you know null pointer?
What are the types of bitwise operator?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
What is the difference between near, far and huge pointers?
Who invented bcpl language?
What is && in c programming?
What is 1f in c?
What does %c mean in c?
If fflush wont work, what can I use to flush input?
What is the -> in c?
Explain how do you list a file’s date and time?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none