SlideShare a Scribd company logo
1 of 2
Download to read offline
Hello guys! please make sure program runs well
USING C anything else
If you are not sure about it please dont send it out
Through this programming assignment, the students will learn to do the following: 1. Practice
processing command line arguments. 2. Perform basic file I/O. 3. Use structs, pointers, and
strings. 4. Use dynamic memory. This assignment asks you to create a doubly linked list which will
be used to sort the words in an input file and print the sorted words to an output file (or standard
output) which will be the solution. Your program, called doublesort, will take the following
command line arguments: % doublesort [d] [-o output_file_name] input_file_name Read the words
in from the input file one at a time. Convert all the letters to lower case. Skip any punctuation or
special characters. If the output_file_name is given with the -o option, the program will output the
sorted letters to the given output file; otherwise, the output shall be to standard output. In addition
to parsing and processing the command line arguments, your program needs to do the following:
1. You need to construct a doubly linked list as you read from input. Each node in the list will link
to the one in front of it and the one behind it if they exist. They will have NULL for the previous
pointer if they are first in the list. They will have NULL for the next pointer if they are last in the list.
You can look up doubly linked lists in your Data Structure textbook. 2. Initially the list is empty. The
program reads from the input file one word at a time and converts it to lower case. Create a node
with a pointer to the word and 2 pointers to nodes, previous and next. Initially the previous and
next pointers should be NULL. 3. As long as you continue reading words, if the word is not already
in the list, create a new node and place the node into the list in the proper alphabetical order. If
there is a node in front of it, adjust the next pointer of that node to point to the new node and make
the previous pointer of the new node to point to the node in front of it. If there is a node after it then
adjust those pointers as well so the list remains continuous. All duplicate words are ignored. 4. An
end of file would indicate the end of input from the input file. 5. Once the program has read all the
input, the program then performs a traversal of the doubly linked list first to last, or last to first if the
- d option is set, to print one word at a time to the output file or stdout. Print one word per3. As
long as you continue reading words, if the word is not already in the list, create a new node and
place the node into the list in the proper alphabetical order. If there is a node in front of it, adjust
the next pointer of that node to point to the new node and make the previous pointer of the new
node to point to the node in front of it. If there is a node after it then adjust those pointers as well
so the list remains continuous. All duplicate words are ignored. 4. An end of file would indicate the
end of input from the input file. 5. Once the program has read all the input, the program then
performs a traversal of the doubly linked list first to last, or last to first if the -d option is set, to print
one word at a time to the output file or stdout. Print one word per line. 6. Before the program ends,
it must reclaim the list! You can do this by going through the list and freeing all nodes. This can be
done in either direction. 7. It is required that you use getopt for processing the command line and
use malloc or calloc and free functions for dynamically allocating and deallocating nodes. Note
that there should be NO SORT function used. As the doubly linked list is created it is done in
proper order. Please submit your work as one zip file. Follow the instructions below carefully (to
avoid unnecessary loss of grade): You should submit the source code and the Makefile in the zip
file called FirstnameLastnameA3. One should be able to create the executable by simply 'make'.
The Makefile should also contain a 'clean' target for cleaning up the directory (removing all object
files at a minimum). Make sure you don't include intermediate files: .0, executables, , etc., in your
submission. (There'll be a penalty for including unnecessary intermediate files). Only two files
should be included unless permission is given for more, those would be doublesort.c, and
Makefile. If you feel a need to include a .h file written by you, please send me a note with a copy of
the file asking for permission. Late submissions will have a deduction as per the syllabus. - If the
program does not compile and do something useful when it runs it will not earn any credit. - If a
program is plagiarized, it will not earn any credit. - If a program uses a user written .h file without
permission it will not earn any credit.

More Related Content

Similar to Hello guys please make sure program runs well USING C anyth.pdf

cs3157-summer06-lab1
cs3157-summer06-lab1cs3157-summer06-lab1
cs3157-summer06-lab1tutorialsruby
 
cs3157-summer06-lab1
cs3157-summer06-lab1cs3157-summer06-lab1
cs3157-summer06-lab1tutorialsruby
 
Bt0067 c programming and data structures2
Bt0067 c programming and data structures2Bt0067 c programming and data structures2
Bt0067 c programming and data structures2Techglyphs
 
Hello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdfHello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdfnamarta88
 
Reaction StatisticsBackgroundWhen collecting experimental data f.pdf
Reaction StatisticsBackgroundWhen collecting experimental data f.pdfReaction StatisticsBackgroundWhen collecting experimental data f.pdf
Reaction StatisticsBackgroundWhen collecting experimental data f.pdffashionbigchennai
 
Question 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdfQuestion 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdfanjandavid
 
AssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdfAssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdftsekar2004
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook applicationsvrohith 9
 
CSC388 Online Programming Languages Homework 3 (due b.docx
CSC388 Online Programming Languages  Homework 3 (due b.docxCSC388 Online Programming Languages  Homework 3 (due b.docx
CSC388 Online Programming Languages Homework 3 (due b.docxannettsparrow
 
Instructions Write a program whose main function is merely a.pdf
Instructions Write a program whose main function is merely a.pdfInstructions Write a program whose main function is merely a.pdf
Instructions Write a program whose main function is merely a.pdfadinathknit
 
intro unix/linux 06
intro unix/linux 06intro unix/linux 06
intro unix/linux 06duquoi
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing filesMukesh Tekwani
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfDatacademy.ai
 

Similar to Hello guys please make sure program runs well USING C anyth.pdf (20)

cs3157-summer06-lab1
cs3157-summer06-lab1cs3157-summer06-lab1
cs3157-summer06-lab1
 
cs3157-summer06-lab1
cs3157-summer06-lab1cs3157-summer06-lab1
cs3157-summer06-lab1
 
Bt0067 c programming and data structures2
Bt0067 c programming and data structures2Bt0067 c programming and data structures2
Bt0067 c programming and data structures2
 
Hello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdfHello, I need help with the following assignmentThis assignment w.pdf
Hello, I need help with the following assignmentThis assignment w.pdf
 
C question
C questionC question
C question
 
Reaction StatisticsBackgroundWhen collecting experimental data f.pdf
Reaction StatisticsBackgroundWhen collecting experimental data f.pdfReaction StatisticsBackgroundWhen collecting experimental data f.pdf
Reaction StatisticsBackgroundWhen collecting experimental data f.pdf
 
pyton Notes1
pyton Notes1pyton Notes1
pyton Notes1
 
Question 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdfQuestion 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdf
 
AssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdfAssignmentModify the Python program by adding the create_dictiona.pdf
AssignmentModify the Python program by adding the create_dictiona.pdf
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
CSC388 Online Programming Languages Homework 3 (due b.docx
CSC388 Online Programming Languages  Homework 3 (due b.docxCSC388 Online Programming Languages  Homework 3 (due b.docx
CSC388 Online Programming Languages Homework 3 (due b.docx
 
Programming in C
Programming in CProgramming in C
Programming in C
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Instructions Write a program whose main function is merely a.pdf
Instructions Write a program whose main function is merely a.pdfInstructions Write a program whose main function is merely a.pdf
Instructions Write a program whose main function is merely a.pdf
 
Satz1
Satz1Satz1
Satz1
 
intro unix/linux 06
intro unix/linux 06intro unix/linux 06
intro unix/linux 06
 
Project report
Project reportProject report
Project report
 
Python reading and writing files
Python reading and writing filesPython reading and writing files
Python reading and writing files
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdf
 
Python Objects
Python ObjectsPython Objects
Python Objects
 

More from actioncbe1

hello can someone help me with this problem 1 By hand you.pdf
hello can someone help me with this problem 1 By hand you.pdfhello can someone help me with this problem 1 By hand you.pdf
hello can someone help me with this problem 1 By hand you.pdfactioncbe1
 
Hay cinco partes en esta pregunta Se ha encontrado una var.pdf
Hay cinco partes en esta pregunta  Se ha encontrado una var.pdfHay cinco partes en esta pregunta  Se ha encontrado una var.pdf
Hay cinco partes en esta pregunta Se ha encontrado una var.pdfactioncbe1
 
Hello I am creating a website using java language and sprin.pdf
Hello I am creating a website using java language and sprin.pdfHello I am creating a website using java language and sprin.pdf
Hello I am creating a website using java language and sprin.pdfactioncbe1
 
Hello Current Generation This is the Old Timers checking in.pdf
Hello Current Generation This is the Old Timers checking in.pdfHello Current Generation This is the Old Timers checking in.pdf
Hello Current Generation This is the Old Timers checking in.pdfactioncbe1
 
hello can anyone help me to answer the Review question Rev.pdf
hello can anyone help me to answer the Review question   Rev.pdfhello can anyone help me to answer the Review question   Rev.pdf
hello can anyone help me to answer the Review question Rev.pdfactioncbe1
 
Having two copies of the t SSRNA genome in the virion is a.pdf
Having two copies of the t SSRNA genome in the virion is a.pdfHaving two copies of the t SSRNA genome in the virion is a.pdf
Having two copies of the t SSRNA genome in the virion is a.pdfactioncbe1
 
Hello I think I have known the general rules to how to con.pdf
Hello  I think I have known the general rules to how to con.pdfHello  I think I have known the general rules to how to con.pdf
Hello I think I have known the general rules to how to con.pdfactioncbe1
 
Gua de la pelcula Hacerse humano Antropologa 101 1 .pdf
Gua de la pelcula Hacerse humano Antropologa 101  1 .pdfGua de la pelcula Hacerse humano Antropologa 101  1 .pdf
Gua de la pelcula Hacerse humano Antropologa 101 1 .pdfactioncbe1
 
Hedge Funds and Private Equity Funds are one of the most imp.pdf
Hedge Funds and Private Equity Funds are one of the most imp.pdfHedge Funds and Private Equity Funds are one of the most imp.pdf
Hedge Funds and Private Equity Funds are one of the most imp.pdfactioncbe1
 
Heather and Daniel investigate the Antimicrobial Resistance .pdf
Heather and Daniel investigate the Antimicrobial Resistance .pdfHeather and Daniel investigate the Antimicrobial Resistance .pdf
Heather and Daniel investigate the Antimicrobial Resistance .pdfactioncbe1
 
Heather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdf
Heather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdfHeather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdf
Heather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdfactioncbe1
 
Healthcare as available through the national health service.pdf
Healthcare as available through the national health service.pdfHealthcare as available through the national health service.pdf
Healthcare as available through the national health service.pdfactioncbe1
 
Health coverage frequencies The Behavioral Risk Factor Sur.pdf
Health coverage frequencies The Behavioral Risk Factor Sur.pdfHealth coverage frequencies The Behavioral Risk Factor Sur.pdf
Health coverage frequencies The Behavioral Risk Factor Sur.pdfactioncbe1
 
Head of State The name of the representative of the Queen o.pdf
Head of State The name of the representative of the Queen o.pdfHead of State The name of the representative of the Queen o.pdf
Head of State The name of the representative of the Queen o.pdfactioncbe1
 
he following parents were mated together Show the Phenotype.pdf
he following parents were mated together Show the Phenotype.pdfhe following parents were mated together Show the Phenotype.pdf
he following parents were mated together Show the Phenotype.pdfactioncbe1
 
han estado publicando las mismas preguntas y no han obtenido.pdf
han estado publicando las mismas preguntas y no han obtenido.pdfhan estado publicando las mismas preguntas y no han obtenido.pdf
han estado publicando las mismas preguntas y no han obtenido.pdfactioncbe1
 
Hayati Belirtiler Vaka almas Bay Charles Lamont 64 yanda .pdf
Hayati Belirtiler Vaka almas   Bay Charles Lamont 64 yanda .pdfHayati Belirtiler Vaka almas   Bay Charles Lamont 64 yanda .pdf
Hayati Belirtiler Vaka almas Bay Charles Lamont 64 yanda .pdfactioncbe1
 
Have students observe a classroom for young children using t.pdf
Have students observe a classroom for young children using t.pdfHave students observe a classroom for young children using t.pdf
Have students observe a classroom for young children using t.pdfactioncbe1
 
Having flowers produced on the stem Axial is a dominant tr.pdf
Having flowers produced on the stem Axial is a dominant tr.pdfHaving flowers produced on the stem Axial is a dominant tr.pdf
Having flowers produced on the stem Axial is a dominant tr.pdfactioncbe1
 
Havaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdf
Havaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdfHavaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdf
Havaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdfactioncbe1
 

More from actioncbe1 (20)

hello can someone help me with this problem 1 By hand you.pdf
hello can someone help me with this problem 1 By hand you.pdfhello can someone help me with this problem 1 By hand you.pdf
hello can someone help me with this problem 1 By hand you.pdf
 
Hay cinco partes en esta pregunta Se ha encontrado una var.pdf
Hay cinco partes en esta pregunta  Se ha encontrado una var.pdfHay cinco partes en esta pregunta  Se ha encontrado una var.pdf
Hay cinco partes en esta pregunta Se ha encontrado una var.pdf
 
Hello I am creating a website using java language and sprin.pdf
Hello I am creating a website using java language and sprin.pdfHello I am creating a website using java language and sprin.pdf
Hello I am creating a website using java language and sprin.pdf
 
Hello Current Generation This is the Old Timers checking in.pdf
Hello Current Generation This is the Old Timers checking in.pdfHello Current Generation This is the Old Timers checking in.pdf
Hello Current Generation This is the Old Timers checking in.pdf
 
hello can anyone help me to answer the Review question Rev.pdf
hello can anyone help me to answer the Review question   Rev.pdfhello can anyone help me to answer the Review question   Rev.pdf
hello can anyone help me to answer the Review question Rev.pdf
 
Having two copies of the t SSRNA genome in the virion is a.pdf
Having two copies of the t SSRNA genome in the virion is a.pdfHaving two copies of the t SSRNA genome in the virion is a.pdf
Having two copies of the t SSRNA genome in the virion is a.pdf
 
Hello I think I have known the general rules to how to con.pdf
Hello  I think I have known the general rules to how to con.pdfHello  I think I have known the general rules to how to con.pdf
Hello I think I have known the general rules to how to con.pdf
 
Gua de la pelcula Hacerse humano Antropologa 101 1 .pdf
Gua de la pelcula Hacerse humano Antropologa 101  1 .pdfGua de la pelcula Hacerse humano Antropologa 101  1 .pdf
Gua de la pelcula Hacerse humano Antropologa 101 1 .pdf
 
Hedge Funds and Private Equity Funds are one of the most imp.pdf
Hedge Funds and Private Equity Funds are one of the most imp.pdfHedge Funds and Private Equity Funds are one of the most imp.pdf
Hedge Funds and Private Equity Funds are one of the most imp.pdf
 
Heather and Daniel investigate the Antimicrobial Resistance .pdf
Heather and Daniel investigate the Antimicrobial Resistance .pdfHeather and Daniel investigate the Antimicrobial Resistance .pdf
Heather and Daniel investigate the Antimicrobial Resistance .pdf
 
Heather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdf
Heather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdfHeather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdf
Heather az nce bir mteri demesi ald ve Hesaba Yatrlanlar .pdf
 
Healthcare as available through the national health service.pdf
Healthcare as available through the national health service.pdfHealthcare as available through the national health service.pdf
Healthcare as available through the national health service.pdf
 
Health coverage frequencies The Behavioral Risk Factor Sur.pdf
Health coverage frequencies The Behavioral Risk Factor Sur.pdfHealth coverage frequencies The Behavioral Risk Factor Sur.pdf
Health coverage frequencies The Behavioral Risk Factor Sur.pdf
 
Head of State The name of the representative of the Queen o.pdf
Head of State The name of the representative of the Queen o.pdfHead of State The name of the representative of the Queen o.pdf
Head of State The name of the representative of the Queen o.pdf
 
he following parents were mated together Show the Phenotype.pdf
he following parents were mated together Show the Phenotype.pdfhe following parents were mated together Show the Phenotype.pdf
he following parents were mated together Show the Phenotype.pdf
 
han estado publicando las mismas preguntas y no han obtenido.pdf
han estado publicando las mismas preguntas y no han obtenido.pdfhan estado publicando las mismas preguntas y no han obtenido.pdf
han estado publicando las mismas preguntas y no han obtenido.pdf
 
Hayati Belirtiler Vaka almas Bay Charles Lamont 64 yanda .pdf
Hayati Belirtiler Vaka almas   Bay Charles Lamont 64 yanda .pdfHayati Belirtiler Vaka almas   Bay Charles Lamont 64 yanda .pdf
Hayati Belirtiler Vaka almas Bay Charles Lamont 64 yanda .pdf
 
Have students observe a classroom for young children using t.pdf
Have students observe a classroom for young children using t.pdfHave students observe a classroom for young children using t.pdf
Have students observe a classroom for young children using t.pdf
 
Having flowers produced on the stem Axial is a dominant tr.pdf
Having flowers produced on the stem Axial is a dominant tr.pdfHaving flowers produced on the stem Axial is a dominant tr.pdf
Having flowers produced on the stem Axial is a dominant tr.pdf
 
Havaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdf
Havaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdfHavaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdf
Havaalan ehir ii servisi Otobs 747 Trudeau havaalanndan .pdf
 

Recently uploaded

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

Hello guys please make sure program runs well USING C anyth.pdf

  • 1. Hello guys! please make sure program runs well USING C anything else If you are not sure about it please dont send it out Through this programming assignment, the students will learn to do the following: 1. Practice processing command line arguments. 2. Perform basic file I/O. 3. Use structs, pointers, and strings. 4. Use dynamic memory. This assignment asks you to create a doubly linked list which will be used to sort the words in an input file and print the sorted words to an output file (or standard output) which will be the solution. Your program, called doublesort, will take the following command line arguments: % doublesort [d] [-o output_file_name] input_file_name Read the words in from the input file one at a time. Convert all the letters to lower case. Skip any punctuation or special characters. If the output_file_name is given with the -o option, the program will output the sorted letters to the given output file; otherwise, the output shall be to standard output. In addition to parsing and processing the command line arguments, your program needs to do the following: 1. You need to construct a doubly linked list as you read from input. Each node in the list will link to the one in front of it and the one behind it if they exist. They will have NULL for the previous pointer if they are first in the list. They will have NULL for the next pointer if they are last in the list. You can look up doubly linked lists in your Data Structure textbook. 2. Initially the list is empty. The program reads from the input file one word at a time and converts it to lower case. Create a node with a pointer to the word and 2 pointers to nodes, previous and next. Initially the previous and next pointers should be NULL. 3. As long as you continue reading words, if the word is not already in the list, create a new node and place the node into the list in the proper alphabetical order. If there is a node in front of it, adjust the next pointer of that node to point to the new node and make the previous pointer of the new node to point to the node in front of it. If there is a node after it then adjust those pointers as well so the list remains continuous. All duplicate words are ignored. 4. An end of file would indicate the end of input from the input file. 5. Once the program has read all the input, the program then performs a traversal of the doubly linked list first to last, or last to first if the - d option is set, to print one word at a time to the output file or stdout. Print one word per3. As long as you continue reading words, if the word is not already in the list, create a new node and place the node into the list in the proper alphabetical order. If there is a node in front of it, adjust the next pointer of that node to point to the new node and make the previous pointer of the new node to point to the node in front of it. If there is a node after it then adjust those pointers as well so the list remains continuous. All duplicate words are ignored. 4. An end of file would indicate the end of input from the input file. 5. Once the program has read all the input, the program then performs a traversal of the doubly linked list first to last, or last to first if the -d option is set, to print one word at a time to the output file or stdout. Print one word per line. 6. Before the program ends, it must reclaim the list! You can do this by going through the list and freeing all nodes. This can be done in either direction. 7. It is required that you use getopt for processing the command line and use malloc or calloc and free functions for dynamically allocating and deallocating nodes. Note that there should be NO SORT function used. As the doubly linked list is created it is done in proper order. Please submit your work as one zip file. Follow the instructions below carefully (to avoid unnecessary loss of grade): You should submit the source code and the Makefile in the zip file called FirstnameLastnameA3. One should be able to create the executable by simply 'make'.
  • 2. The Makefile should also contain a 'clean' target for cleaning up the directory (removing all object files at a minimum). Make sure you don't include intermediate files: .0, executables, , etc., in your submission. (There'll be a penalty for including unnecessary intermediate files). Only two files should be included unless permission is given for more, those would be doublesort.c, and Makefile. If you feel a need to include a .h file written by you, please send me a note with a copy of the file asking for permission. Late submissions will have a deduction as per the syllabus. - If the program does not compile and do something useful when it runs it will not earn any credit. - If a program is plagiarized, it will not earn any credit. - If a program uses a user written .h file without permission it will not earn any credit.