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

Answer Posted / dishant srivastava

void max_two(unsigned char A[], unsigned char Size,
unsigned char *first, unsigned char *second)
{
unsigned char i;
*first = A[0];

for(i = 1; i < Size; i++)
{
if(*first <= A[i])
{
*second = *first;
*first = A[i];
}
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you declare an array that will hold more than 64kb of data?

899


What are the different types of data structures in c?

597


I came across some code that puts a (void) cast before each call to printf. Why?

674


code for quick sort?

1618


Why can arithmetic operations not be performed on void pointers?

586






write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

1623


Why do we use int main instead of void main in c?

613


What is a null pointer in c?

591


What is the advantage of an array over individual variables?

733


What is substring in c?

635


Compare and contrast compilers from interpreters.

679


What is typedef?

664


What is #include cctype?

576


What's the right way to use errno?

619


Why is c known as a mother language?

740