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
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What are enums in c?
What does %c do in c?
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
Why is python slower than c?
Where does the name "C" come from, anyway?
What header files do I need in order to define the standard library functions I use?
Is a house a shell structure?
What are register variables? What are the advantage of using register variables?
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
What is anagram in c?
What is file in c language?
What does & mean in scanf?
What are the basic data types associated with c?
What is context in c?