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 happens if you free a pointer twice?
Should I learn c before c++?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
Why do we need volatile in c?
What is c method?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
Is swift based on c?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Can you define which header file to include at compile time?
What is the difference between āgā and āgā in C?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Can we declare function inside main?
What is the difference between NULL and NUL?
code for quick sort?
What is the description for syntax errors?