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 string function in c?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
How can I find the modification date and time of a file?
What is the use of typedef in structure in c?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
How are structure passing and returning implemented?
How can you tell whether two strings are the same?
What is function prototype in c with example?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
Do pointers take up memory?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
what are the advantages of a macro over a function?
what is event driven software and what is procedural driven software?
Why c is faster than c++?