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
What is c preprocessor mean?
Why cant I open a file by its explicit path?
Difference between Function to pointer and pointer to function
Where is c used?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
i want to know the procedure of qualcomm for getting a job through offcampus
Write a code to remove duplicates in a string.
Explain how can I read and write comma-delimited text?
Where are local variables stored in c?
What are the key features in c programming language?
What is the full form of getch?
Apart from dennis ritchie who the other person who contributed in design of c language.
How can you increase the size of a dynamically allocated array?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
Is there any data type in c with variable size?