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
Write a program to swap two numbers without using a temporary variable?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
Explain what will the preprocessor do for a program?
Can math operations be performed on a void pointer?
What is the meaning of c in c language?
How are structure passing and returning implemented?
What is the use of typedef in structure in c?
What are the types of data files?
What is the condition that is applied with ?: Operator?
What is clrscr ()?
Explain how can you be sure that a program follows the ansi c standard?
Who is the main contributor in designing the c language after dennis ritchie?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What are valid signatures for the Main function?
What do you understand by normalization of pointers?