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
Not all reserved words are written in lowercase. TRUE or FALSE?
Where define directive used?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
Simplify the program segment if X = B then C ← true else C ← false
Do you know the purpose of 'register' keyword?
What is the g value paradox?
Explain what is the benefit of using const for declaring constants?
Explain what are the different file extensions involved when programming in c?
What is logical error?
List out few of the applications that make use of Multilinked Structures?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
Why is c called a structured programming language?
What is quick sort in c?
Write a program to reverse a linked list in c.
How to Throw some light on the splay trees?