Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / abdur rab

#include <stdio.h>

int main ( int argc, char* argv[] )
{

int* array_int, nTotalCount = 10, sbig, big, i;
printf ( "\n/********************** Second Biggest
Number ********************/" );
array_int = ( int* ) malloc ( nTotalCount * sizeof
( int ) );

for ( i = 0; i < nTotalCount; i++ )
array_int [i] = rand() % 100;

printf( "\nThe Numbers in given order" );
for ( i = 0; i < nTotalCount; i++ )
printf ( "\t%d", array_int [i] );

for ( i = 0; i < nTotalCount; i++ )
{
switch ( i )
{
case 0:
sbig = big = array_int [i];
break;
default:
if ( big < array_int [i] ) {
sbig = big;
big = array_int [i];
} else {
if ( sbig <
array_int [i] ) sbig = array_int [i] ;
}
break;
}
}
printf ( "\n sbig :%d big :%d", sbig, big );

free ( array_int );
}


For hashtable please refer the following link
http://www.geocities.com/abdur_rab7/Open_Hash/openhash.html

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between Structure and Unions?

1185


Explain what are the __date__ and __time__ preprocessor commands?

1073


What are the advantages of Macro over function?

1927


Write a program to find the biggest number of three numbers in c?

1005


Does * p ++ increment p or what it points to?

1054


Which of these functions is safer to use : fgets(), gets()? Why?

1044


Describe dynamic data structure in c programming language?

1039


What do you mean by dynamic memory allocation in c?

1050


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1181


Why c is a procedural language?

1010


Is r written in c?

1110


What do you mean by keywords in c?

1083


Is null valid for pointers to functions?

1107


How can I insert or delete a line (or record) in the middle of a file?

977


Write a program to check palindrome number in c programming?

962