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
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
Can we replace the struct function in tree syntax with a union?
Write a program for finding factorial of a number.
Write a program to swap two numbers without using third variable?
Is c dynamically typed?
What are the different types of constants?
Explain the concept and use of type void.
How do I convert a string to all upper or lower case?
What is the meaning of ?
What is #include stdlib h?
What is the difference between array and pointer?
What is double pointer?
Array is an lvalue or not?
How do you use a 'Local Block'?
What is non linear data structure in c?