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 are the features of c language?

621


What are identifiers c?

566


What is a nested formula?

605


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2684


What is calloc in c?

661






What do you mean by scope of a variable in c?

544


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

1600


How are 16- and 32-bit numbers stored?

725


to find the closest pair

1823


Differentiate call by value and call by reference?

569


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

736


In which layer of the network datastructure format change is done

1433


Is printf a keyword?

762


What is the function of volatile in c language?

668


Write a code to remove duplicates in a string.

629