1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision
Answer Posted / rao
#include<stdio.h>
int main()
{
int arr[] = {2,3,20,7,8,1};
int max, sec;
int i;
max=0;
sec=0;
for ( i=0; i< 6; i++)
{
if(arr[i] > max)
max = arr[i];
}
for ( i=0; i< 6; i++)
{
if ( (arr[i] > sec) && (arr[i] < max))
sec = arr[i];
}
printf(" max=%d\n sec=%d\n", max, sec);
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
What is the use of structure padding in c?
largest Of three Number using without if condition?
What is the sizeof () operator?
What is the use of function in c?
Explain high-order and low-order bytes.
Differentiate call by value and call by reference?
I have seen function declarations that look like this
What is data structure in c and its types?
How can I do serial ("comm") port I/O?
What is the difference between union and anonymous union?
What is strcpy() function?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
When should I declare a function?