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
When the macros gets expanded?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Is it better to bitshift a value than to multiply by 2?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What are 3 types of structures?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What are linked lists in c?
What is default value of global variable in c?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Why main is used in c?
Explain how do you sort filenames in a directory?
When was c language developed?
Why does this code crash?
What is the difference between int main and void main?
Why header file is used in c?