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
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What is the usage of the pointer in c?
Does c have class?
Explain how do you override a defined macro?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is the use of getchar() function?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
Does sprintf put null character?
What is the purpose of type declarations?
Can variables be declared anywhere in c?
What is function what are the types of function?
What is ctrl c called?
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor