Price range Planner Mini Challenge for Closing 12 months This project is aimed toward creating a system by which the […]
Category: Uncategorized
Digital Image Processing
Digital Picture Processing Obtain Digital Picture Processing free of charge. Right here i’m going to present quick description on Digital […]
Project Planning Software
Venture Planning Software program Obtain Venture Planning Software program without cost. Right here i’m going to provide brief description on […]
Graphical User Interface designer for Java project
Graphical Person Interface designer for Java The ambition the place to develop a completely practical GUI designer for Java. […]
Database Handler Software
Obtain Database Handler Software program free of charge. Right here i’m going to provide brief description on Database Handler Software […]
How to Implement Hash Table using C language
Implement Hash Desk utilizing C language
1 2 |
#embrace<stdio.h> <br/> #embrace<conio.h> <br/> #outline MAX 8 <br/> void createwor(int [][2]); <br/> void insertwor(int [][2]); <br/> void deletwor(int [][2]); <br/> void displaywor(int [][2]); <br/> void createwr(int [][2]); <br/> void insertwr(int [][2]); <br/> void deletwr(int [][2]); <br/> void displaywr(int [][2]); <br/> void searchwr(int [][2]); <br/> void searchwor(int [][2]); <br/> void major() <br/> { <br/> int ch,ch1,i,j; <br/> int a[MAX][2],b[MAX][2]; <br/> for(i=0;i<max;i++) <br/> for(j=0;j<2;j++) <br/> b[i][j]=-1; <br/> for(i=0;i<max;i++) <br/> for(j=0;j<2;j++) <br/> a[i][j]=-1; <br/> do <br/> { <br/> clrscr(); <br/> printf("nttHASH TABLEntt1.CREATE HASH TABLEntt2.INSERTntt3.DELETEntt4.DISPLAYntt5.SEARCHntt6.EXIT"); <br/> printf("nttENTER UR CHOICE"); <br/> scanf("%d",&ch); <br/> swap(ch) <br/> { <br/> case 1: <br/> do <br/> { <br/> clrscr(); <br/> printf("CREATE HASH TABLEntt1.WITH REPLACEMENTntt2.WITHOUT REPLACEMENTntt3.EXIT"); <br/> printf("nttENTER UR CHOICE"); <br/> scanf("%d",&ch1); <br/> swap(ch1) <br/> { <br/> case 1: <br/> printf("WITH REPLACEMENT"); <br/> createwr(a); <br/> break; <br/> case 2: <br/> printf("WITHOUT REPLACEMENT"); <br/> createwor(b); <br/> break; <br/> case 3: <br/> break; <br/> } <br/> }whereas(ch1!=3); <br/> break; <br/> case 2: <br/> do <br/> { <br/> clrscr(); <br/> printf("nttINSERTntt1.WITH REPLACEMENTntt2.WITHOUT REPLACEMENTntt3.EXIT"); <br/> printf("nttENTER UR CHOICE"); <br/> scanf("%d",&ch1); <br/> swap(ch1) <br/> { <br/> case 1: <br/> printf("WITH REPLACEMENT"); <br/> insertwr(a); <br/> break; <br/> case 2: <br/> printf("WITHOUT REPLACEMENT"); <br/> insertwor(b); <br/> break; <br/> case 3: <br/> break; <br/> } <br/> }whereas(ch1!=3); <br/> break; <br/> case 3: <br/> do <br/> { <br/> clrscr(); <br/> printf("nttDELETEntt1.WITH REPLACEMENTntt2.WITHOUT REPLACEMENTntt3.EXIT"); <br/> printf("nttENTER UR CHOICE"); <br/> scanf("%d",&ch1); <br/> swap(ch1) <br/> { <br/> case 1: <br/> printf("WITH REPLACEMENT"); <br/> deletwr(a); <br/> break; <br/> case 2: <br/> printf("WITHOUT REPLACEMENT"); <br/> deletwor(b); <br/> break; <br/> case 3: <br/> break; <br/> } <br/> }whereas(ch1!=3); <br/> break; <br/> case 4: <br/> do <br/> { <br/> clrscr(); <br/> printf("nttDISPLAYntt1.WITH REPLACEMENTntt2.WITHOUT REPLACEMENTntt3.EXIT"); <br/> printf("nttENTER UR CHOICE"); <br/> scanf("%d",&ch1); <br/> swap(ch1) <br/> { <br/> case 1: <br/> printf("WITH REPLACEMENT"); <br/> displaywr(a) ; <br/> break; <br/> case 2: <br/> printf("WITHOUT REPLACEMENT"); <br/> displaywor(b) ; <br/> break; <br/> case 3: <br/> break; <br/> } <br/> }whereas(ch1!=3); <br/> break; <br/> case 5: <br/> do <br/> { <br/> clrscr(); <br/> printf("nttSEARCHntt1.WITH REPLACEMENTntt2.WITHOUT REPLACEMENTntt3.EXIT"); <br/> printf("nttENTER UR CHOICE"); <br/> scanf("%d",&ch1); <br/> swap(ch1) <br/> { <br/> case 1: <br/> printf("WITH REPLACEMENT"); <br/> searchwr(a); <br/> break; <br/> case 2: <br/> printf("WITHOUT REPLACEMENT"); <br/> searchwor(b); <br/> break; <br/> case 3: <br/> break; <br/> } <br/> }whereas(ch1!=3); <br/> break; <br/> case 6: <br/> break; <br/> } <br/> }whereas(ch!=6); <br/> getch(); <br/> } <br/> void createwor(int b[][2]) <br/> { <br/> int i,j; <br/> for(i=0;i<max;i++) <br/> for(j=0;j<2;j++) <br/> b[i][j]=-1; <br/> do <br/> { <br/> insertwor(b); <br/> printf("DO U WANT TO ENTER MORE"); <br/> }whereas(getche()=='y'); <br/> } <br/> void insertwor(int b[][2]) <br/> { <br/> int r,s,t,a; <br/> printf("nENTER DATA"); <br/> scanf("%d",&a); <br/> s=a%5; <br/> if(b[s][0]==-1) <br/> b[s][0]=a; <br/> else <br/> { <br/> //printf("COLLISION OCCURS"); <br/> //getch(); <br/> whereas(1) <br/> { <br/> printf("nTRUE COLLISION OCCURS"); <br/> getch(); <br/> if(b[s][1]==-1) <br/> { <br/> t=s; <br/> whereas(b[s][0]!=-1) <br/> { //s++; <br/> s=(s+1)%MAX; <br/> if(s==t) <br/> { <br/> printf("OVERFLOW"); <br/> break; <br/> } <br/> } <br/> if(s!=t) <br/> { <br/> b[s][0]=a; <br/> b[t][1]=s; <br/> } <br/> break; <br/> } <br/> else <br/> s=b[s][1]; <br/> } <br/> } <br/> } <br/> void deletwr(int b[][2]) <br/> { <br/> int r,s,t,a; <br/> printf("ENTER DATA WHICH U WANT TO DELETE"); <br/> scanf("%d",&a); <br/> t=s=a%5; <br/> whereas(1) <br/> { <br/> if(b[s][0]==a) <br/> break; <br/> t=s; <br/> s=b[s][1]; <br/> if(s==-1) <br/> break; <br/> } <br/> if(s==-1) <br/> printf("NOT FOUND"); <br/> else <br/> { <br/> whereas(1) <br/> { <br/> if(b[b[t][1]][0]!=a) <br/> b[t][0]=b[b[t][1]][0]; <br/> r=b[t][1]; <br/> if(b[r][1]==-1) <br/> { <br/> b[t][1]=b[r][1]; <br/> break; <br/> } <br/> t=r; <br/> } <br/> b[r][0]=-1; <br/> } <br/> } <br/> void displaywor(int b[][2]) <br/> { <br/> int i,r,s,t,a; <br/> printf("nINDEXtDATAtCHAIN"); <br/> for(i=0;i<max;i++) <br/> { <br/> if(b[i][0]!=-1) <br/> { <br/> printf("npercentd",i); <br/> printf("tpercentd",b[i][0]); <br/> //if(b[i][1]!=-1) <br/> printf("tpercentd",b[i][1]); <br/> } <br/> } <br/> getch(); <br/> } <br/> void createwr(int b[][2]) <br/> { <br/> int i,j; <br/> for(i=0;i<max;i++) <br/> for(j=0;j<2;j++) <br/> b[i][j]=-1; <br/> do <br/> { <br/> insertwr(b); <br/> printf("DO U WANT TO ENTER MORE"); <br/> }whereas(getche()=='y'); <br/> } <br/> void insertwr(int b[][2]) <br/> { <br/> int r,s,t,a,i; <br/> printf("nENTER DATA"); <br/> scanf("%d",&a); <br/> s=a%5; <br/> if(b[s][0]==-1) <br/> b[s][0]=a; <br/> else if(s==(b[s][0]%5)) <br/> { <br/> //printf("TRUE COLLISION OCCURS"); <br/> //getch(); <br/> whereas(1) <br/> { <br/> printf("nTRUE COLLISION OCCURS"); <br/> getch(); <br/> if(b[s][1]==-1) <br/> { <br/> t=s; <br/> whereas(b[s][0]!=-1) <br/> { <br/> s=(s+1)%MAX; <br/> if(t==s) <br/> { <br/> printf("OVERFLOW"); <br/> getch(); <br/> break; <br/> } <br/> } <br/> if(t!=s) <br/> { <br/> b[s][0]=a; <br/> b[t][1]=s; <br/> } <br/> break; <br/> } <br/> else <br/> s=b[s][1]; <br/> } <br/> } <br/> else <br/> { <br/> printf("FALSE COLLISION OCCURS"); <br/> getch(); <br/> r=i=b[s][0]%5; <br/> whereas(1) <br/> { <br/> if(b[i][1]==s) <br/> { <br/> b[i][1]=b[s][1]; <br/> break; <br/> } <br/> i=b[i][1]; <br/> } <br/> t=i; <br/> whereas(b[i][1]!=-1) <br/> i=b[i][1]; <br/> t=i; <br/> i=(i+1)%MAX; <br/> whereas(b[i][0]!=-1) <br/> { <br/> i=(i+1)%MAX; <br/> if(r==i) <br/> { <br/> printf("OVERFLOW"); <br/> getch(); <br/> break; <br/> } <br/> } <br/> if(r!=i) <br/> { <br/> b[t][1]=i; <br/> b[i][0]=b[s][0]; <br/> //b[i][1]=-1; <br/> b[s][0]=a; <br/> b[s][1]=-1; <br/> //b[r][1]=i; <br/> } <br/> } <br/> } <br/> void displaywr(int b[][2]) <br/> { <br/> int i,r,s,t,a; <br/> printf("nINDEXtDATAtCHAIN"); <br/> for(i=0;i<max;i++) <br/> { <br/> if(b[i][0]!=-1) <br/> { <br/> printf("npercentd",i); <br/> printf("tpercentd",b[i][0]); <br/> //if(b[i][1]!=-1) <br/> printf("tpercentd",b[i][1]); <br/> } <br/> } <br/> getch(); <br/> } <br/> void searchwr(int b[][2]) <br/> { <br/> int r,s,a; <br/> printf("ENTER DATA WHICH U WANT TO SEARCH"); <br/> scanf("%d",&a); <br/> s=a%5; <br/> whereas(1) <br/> { <br/> if(b[s][0]==a) <br/> break; <br/> s=b[s][1]; <br/> if(s==-1) <br/> break; <br/> } <br/> if(s==-1) <br/> printf("NOT FOUND"); <br/> else <br/> { <br/> printf("nINDEX IS %d:",s); <br/> printf("nDATA IS %d:",b[s][0]); <br/> printf("nINDEX WHICH IS CHAINED FROM IT:%d",b[s][1]); <br/> } <br/> getch(); <br/> } <br/> void searchwor(int b[][2]) <br/> { <br/> int r,s,a; <br/> printf("ENTER DATA WHICH U WANT TO SEARCH"); <br/> scanf("%d",&a); <br/> s=a%5; <br/> whereas(1) <br/> { <br/> if(b[s][0]==a) <br/> break; <br/> s=b[s][1]; <br/> if(s==-1) <br/> break; <br/> } <br/> if(s==-1) <br/> printf("NOT FOUN D"); <br/> else <br/> { <br/> printf("nINDEX IS %d:",s); <br/> printf("nDATA IS %d:",b[s][0]); <br/> printf("nINDEX WHICH IS CHAINED FROM IT:%d",b[s][1]); <br/> } <br/> getch(); <br/> } <br/> void deletwor(int b[][2]) <br/> { <br/> int r,s,t,a,okay; <br/> printf("ENTER DATA WHICH U WANT TO DELETE"); <br/> scanf("%d",&a); <br/> t=s=a%5; <br/> whereas(1) <br/> { <br/> if(b[s][0]==a) <br/> break; <br/> t=s; <br/> s=b[s][1]; <br/> if(s==-1) <br/> break; <br/> } <br/> if(s==-1) <br/> printf("NOT FOUND"); <br/> else <br/> { <br/> r=t; <br/> whereas(1) <br/> { <br/> if(b[b[r][1]][0]!=a&&b[b[r][1]][0]%5!=b[r][1]) <br/> { <br/> b[t][0]=b[b[r][1]][0]; <br/> t=r; <br/> } <br/> else if(b[b[t][1]][1]==-1) <br/> { <br/> b[t][1]=-1; <br/> break; <br/> } <br/> r=b[r][1]; <br/> if(b[r][1]==-1) <br/> { <br/> b[t][1]=b[r][1]; <br/> break; <br/> } <br/> if(b[b[t][1]][0]!=a&&b[b[t][1]][0]%5!=b[t][1]) <br/> { <br/> t=r; <br/> okay=r; <br/> } <br/> } <br/> b[r][0]=b[k][1]=-1; <br/> } <br/> } |
Supply projectgeek.com
Water marking System
Water marking System Obtain Water marking System at no cost. Right here i’m going to provide quick description on Water […]
Display Numbers in Ascending Order C language
Show Numbers in Ascending Order C language Develop a program in C Language to simply accept 5 numbers as enter […]
Inventory Warehouse Management system
Stock Warehouse Administration system Obtain Stock Warehouse Administration system free of charge. Right here i’m going to present quick description […]
Shopping Cart mini project in Asp.Net
Buying Cart mini project in Asp.Internet Buying cart is a vital function utilized in e-commerce to help individuals making purchases […]
E-Post Office mini project
E-Publish Workplace mini project in Asp.Internet E-Publish Workplace is the postal service On-line portal . It sells Postcards, Packets, Stamps, […]
Contract Management System
Contract Administration System Obtain Contract Administration System without spending a dime. Right here i’m going to provide brief description on […]
String Operations in C Language
Easy String Operations in C Language Write a Easy String Operations program in C to carry out String operations on […]
Matrix Operations in C Language
Matrix Operations in C Language Write a Matrix Operations program in C to compute addition or subtraction or multiplication of […]
Telecom Customer Service Management System
Telecom Buyer Service Administration System Obtain Telecom Buyer Service Administration System without spending a dime. Right here i’m going to […]
Bubble Sort Code in C Language
Bubble Kind Code in C Language Write a program in C to kind n integers utilizing bubble kind. Program ought […]
Company Dealer Communication System
Firm Seller Communication System Obtain Firm Seller Communication System at no cost. Right here i’m going to offer quick description […]
E-Banking mini project for Students
E-Banking mini Challenge The target of the E-Banking mini project is to design and develop Safe on-line Banking Utility utilizing […]
Roots of a quadratic equation in C Language
Roots of a quadratic equation in C Language Write a Roots of a quadratic equation program in C to compute […]
Auction and Bidding System
Public sale and Bidding System Obtain Public sale and Bidding System. Right here i’m going to present brief description on […]