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

What is the difference between array_name and &array_name?

863


What is the difference between functions abs() and fabs()?

754


How do I send escape sequences to control a terminal or other device?

702


Explain what is meant by 'bit masking'?

735


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1804






An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

760


What do the functions atoi(), itoa() and gcvt() do?

815


How can I recover the file name given an open stream or file descriptor?

699


Define Array of pointers.

734


How to establish connection with oracle database software from c language?

1762


Is a house a mass structure?

744


Why n++ execute faster than n+1 ?

2080


What is meant by inheritance?

725


Can you please explain the difference between strcpy() and memcpy() function?

704


What is the purpose of scanf() and printf() functions?

806