1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void soft(int *,int *);
void main()
{
int a[30],n;
printf("enter the number of elements going to enter :");
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",a[i]);
soft(a);
printf("the second maximum in the given array is :");
getch();
}
void soft(int *a,int *n);
{
int temp;
for(int i=0;i<(*n);i++)
{
for(j=0;j<(*n);j++)
{
if(a[j+1]<a[j])
{
temp=a[j+1];
a[j+1]=a[j];
a[j]=temp;
}
}
}
printf("%d",a[n-1]);
}

sorry i dont know the concept of hash table!!!!!!!!!!!!!!!

Is This Answer Correct ?    1 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

1907


What are enums in c?

661


What does %c do in c?

584


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

2740


Why is python slower than c?

604






Where does the name "C" come from, anyway?

645


What header files do I need in order to define the standard library functions I use?

539


Is a house a shell structure?

697


What are register variables? What are the advantage of using register variables?

687


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

659


What is anagram in c?

521


What is file in c language?

576


What does & mean in scanf?

604


What are the basic data types associated with c?

816


What is context in c?

541