Professional Documents
Culture Documents
Dictionary: K L University Freshman Engineering Department Department of BES-1
Dictionary: K L University Freshman Engineering Department Department of BES-1
Dictionary
SUBMITTED BY:
NAME ID NO.
1. RAHUL SARKAR 2100032538
2. SANJAY KUMAR 2100032540
3. NANDA KISHORE JANA 2100032541
4. HARSHITA SINHA 2100032560
KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
1
DEPARTMENT OF BASIC ENGINEERING SCIENCES
CERTIFICATE
This is to certify that the project based laboratory report entitled “DICTIONARY”
Regd. No. 2100032540, 2100032541, 2100033538, 2100032560 to the Department of Computer Science
Engineering, KL University in partial fulfillment of the requirements for the completion of a project
based Laboratory in “Design of data structures” course in I B Tech I Semester, is a bonafide record
of the work carried out by him/her under my supervision during the academic year 2021 – 2022.
2
ACKNOWLEDGEMENTS
It is great pleasure for me to express my gratitude to our honorable President Sri. Koneru
Satyanarayana, for giving the opportunity and platform with facilities in accomplishing the project based
laboratory report.
I express the sincere gratitude to our Director Dr. A. Jagdeesh for his administration towards our
academic growth.
I express sincere gratitude to our Coordinator and HOD-BES Dr. D. Haritha for her leadership and
constant motivation provided in successful completion of our academic semester. I record it as my privilege
to deeply thank for providing us the efficient faculty and facilities to make our ideas into reality.
I express my sincere thanks to our project supervisor D. ANAND for his novel association of ideas,
encouragement, appreciation and intellectual zeal which motivated us to venture this project successfully.
Finally, it is pleased to acknowledge the indebtedness to all those who devoted themselves directly or
indirectly to make this project report success.
NAME ID NO.
1. RAHUL SARKAR 2100032538
2. SANJAY KUMAR 2100032540
3. NANDA KISHORE JANA 2100032541
4. HARSHITA SINHA 2100032560
3
ABSTRACT
create a dictionary as search a word, adding words, display the words and delete
the words.
appropriate implementation that can use. Different language enforce different type
4
INDEX
1 Introduction 6
6 Implementation 13-16
5
8 Conclusion 20
6
INTRODUCTION
Dictionary is one of the important Data Structures that is usually used to store data in the key-value
format. Each element presents in a dictionary data structure compulsorily have a key and some value is
associated with that particular key.
In other words, we can also say that Dictionary data structure is used to store the data in key-value
pairs. Other names for the Dictionary data structure are associative array, map, symbol table but
broadly it is referred to as Dictionary.
Many popular languages add Dictionary or associative array as a primitive data type in their
languages while other languages which don't consider Dictionary or associative array as a
primitive data type have included Dictionary or associative array in their software libraries. A direct
form of hardware-level support for the Dictionary or associative array is Contentaddressable
memory.
In Dictionary or associative array, the relation or association between the key and the value is
known as the mapping. We can say that each value in the dictionary is mapped to a particular key
present in the dictionary or vice-versa.
7
AIM
1) Adding words
2) Searching words
3) Display dictionary
4) Deleting
ADVANTAGES
4. it helps the analyst to simplify the structure for meeting the data requirement
of the system.
DISADVANTAGES
8
FUTURE IMPLEMENTATION
2. Pronounciation
3. Vocabulary
SYSTEM REQUIREMENTS
➢ SOFTWARE REQUIREMENTS:
Language: C language.
➢ HARDWARE REQUIREMENTS:
The hardware requirements that map towards the software are as follows:
RAM: 8 GB.
Processor: i5/i7.
9
DATA FLOW DIAGRAM
10
11
ALGORITHM
Step-1: Start.
Step-2: Read and write the words as per written on the output version.
5. Print “exit”.
2. break.
Step-9: return.
Step-10: Stop.
12
IMPLEMENTATION
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
struct node
char word[30];
};
strcpy(nnode->word,n);
nnode->nextpointer=NULL;
if(headnode==NULL)
headnode=nnode;
return headnode;
while(tempvalue->nextpointer!=NULL)
tempvalue=tempvalue->nextpointer;
tempvalue->nextpointer=nnode;
13
return headnode;
int foundvalue=0;
if(strcmp(headnode->word,n)==0)
foundvalue=1;
headnode=headnode->nextpointer;
free(p);
else
while(curr!=NULL)
if(strcmp(curr->word,n)==0)
prev->nextpointer=curr->nextpointer;
free(curr);
foundvalue=1;
break;
14
prev=curr;
curr=curr->nextpointer;
if(foundvalue==0)
else
return headnode;
int cnt=0;
printf("Words in dictionary\n");
while(tempvalue!=NULL)
if(tempvalue->word[0]==c)
cnt++;
printf("%s\n",tempvalue->word);
tempvalue=tempvalue->nextpointer;
printf("\n");
15
if(cnt==0)
else
while(nnode != NULL)
printf("%s \n",nnode->word);
nnode= nnode->nextpointer;
int main()
FILE *fpvalue;
fpvalue=fopen("dictionary.txt","r");
char name[30];
headnode=add(headnode,name);
fclose(fpvalue);
while(1)
16
{
printf("5: Exit\n");
int n;
scanf("%d",&n);
if(n==1)
char n[30];
scanf("%s",n);
headnode=add(headnode,n);
else if(n==2)
char n[30];
scanf("%s",n);
headnode=delete(headnode,n);
else if(n==3)
17
{
char ch;
scanf(" %c",&ch);
search(headnode,ch);
else if(n==4)
PrintList(headnode);
else if(n==5)
FILE *f;
f=fopen("dictionary.txt","w");
while(tempvalue!=NULL)
fputs(strcat(tempvalue->word,"\n"),f);
tempvalue=tempvalue->nextpointer;
break;
}}
return 0;
18
}
19
INTEGRATION AND SYSTEM TESTING
OUTPUTS
Screen Shots:
20
21
22
CONCLUSION
We have successfully completed the project “Dictionary” in simply way and given all
23