SlideShare ist ein Scribd-Unternehmen logo
1 von 11
WAP A C PROGRAM TO CREATE TEXT EDITOR WHICH CONTAIN
THE WORKING OF OPEN, SAVE, NEW, EXIT AND RENAME
Term paper submitted
By
To
Department of Computer
Science and Engineering
In partial fulfilment of the Requirement for
the CA of Linux Programming
To
Mr. Sir
(December 2013)
CONTENTS
 INTRODUCTION TO TEXT EDITORS
 AKNOWLEDGEMENT
 ALGORITHM
 SOURCE CODE
 OUTPUT
 CONCLUSION
 REFERENCES
INTRODUCTION TO TEXT EDITORS
A text editor is used to edit plain text files. Text editors differ from word processors, such as
Microsoft Word or WordPerfect, in that they do not add additional formatting information to
documents. You might write a paper in Word, because it contains tools to change fonts, margins,
and layout, but Word by default puts that formatting and layout information directly into the file,
which will confuse the compiler. If you open a .doc file in a text editor, you will notice that most
of the file is formatting codes. Text editors, however, do not add formatting codes, which makes
it easier to compile your code.
Text editors have a feature set different from that of a traditional word processing program. For
example, most won't let you include pictures, or include tables, or double-space your
writing. The features of text editors vary from implementation to implementation, but there are
several kinds of features that most editors have. Below are listed some of the most common and
useful features.
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of any task would be incomplete
without the mention of people whose ceaseless cooperation made it possible, whose constant
guidance and encouragement crown all efforts with success. I am extremely grateful to my
teacher ‘Mr.Sir’ for being a source of inspiration and for her constant support in the design,
implementation and evaluation of this term paper. I am thankful to him for his constant
constructive criticism and valuable suggestions, which benefited me a lot while developing the
term paper on ‘Text Editors’. Through this column, it would be my utmost pleasure to express
my warm thanks to him for his encouragement, co-operation and consent as without which I
mightn’t be able to accomplish this term paper.
I would also like to express my thanks to almighty god for his grace and mercy.
Above all, I am extremely thankful to my friends who always remained aside me.
ALGORITHM:
1. Display options new, open and exit and get choice.
2. If choice is 1 , call Create() function.
3. If choice is 2, call Display() function.
4. If choice is 3, call Append() function.
5. If choice is 4, call Delete() function.
6. If choice is 5, call Display() function.
7. Create()
7.1 Get the file name and open it in write mode.
7.2 Get the text from the user to write it.
8. Display()
8.1 Get the file name from user.
8.2 Check whether the file is present or not.
8.2 If present then display the contents of the file.
9. Append()
9.1 Get the file name from user.
9.2 Check whether the file is present or not.
9.3 If present then append the file by getting the text to add with the existing file.
10. Delete()
10.1 Get the file name from user.
10.2 Check whether the file is present or not.
10.3 If present then delete the existing file.
WAP A C PROGRAM TO CREATE TEXT EDITOR WHICH CONTAIN
THE WORKING OF OPEN, SAVE, NEW, EXIT AND RENAME
1 #include<stdio.h>
2 #include<conio.h>
3 #include<process.h>
4 int i,j,ec,fg,ec2;
5 char fn[20],e,c;
6 FILE *fp1,*fp2,*fp;
7 void Create();
8 void Append();
9 void Delete();
10 void Display();
11 void main()
12 {
13 do {
14 printf("ntt***** TEXT EDITOR *****");
15 printf("nntMENU:nt-----n ");
16 printf("nt1.CREATEnt2.DISPLAYnt3.APPENDnt4.DELETEnt5.EXITn");
17 printf("ntEnter your choice: ");
18 scanf("%d",&ec);
19 switch(ec)
20 {
a) case 1:
b) Create();
c) break;
d) case 2:
e) Display();
f) break;
g) case 3:
h) Append();
i) break;
j) case 4:
k) Delete();
l) break;
m) case 5:
n) exit(0);
21 }
22 }while(1);
23 }
24 void Create()
25 {
26 fp1=fopen("temp.txt","w");
27 printf("ntEnter the text and press '.' to savennt");
28 while(1)
29 {
30 c=getchar();
31 fputc(c,fp1);
32 if(c == '.')
33 {
a) fclose(fp1);
b) printf("ntEnter then new filename: ");
c) scanf("%s",fn);
d) fp1=fopen("temp.txt","r");
e) fp2=fopen(fn,"w");
f) while(!feof(fp1))
g) {
h) c=getc(fp1);
i) putc(c,fp2);
j) }
k) fclose(fp2);
l) break;
34 }}
35 }
36 void Display()
37 {
38 printf("ntEnter the file name: ");
39 scanf("%s",fn);
40 fp1=fopen(fn,"r");
41 if(fp1==NULL)
42 {
a) printf("ntFile not found!");
b) goto end1;
43 }
44 while(!feof(fp1))
45 {
a) c=getc(fp1);
b) printf("%c",c);
46 }
47 end1:
48 fclose(fp1);
49 printf("nntPress any key to continue...");
50 getch();
51 }
52 void Delete()
53 {
54 printf("ntEnter the file name: ");
55 scanf("%s",fn);
56 fp1=fopen(fn,"r");
57 if(fp1==NULL)
58 {
a) printf("ntFile not found!");
b) goto end2;
59 }
60 fclose(fp1);
61 if(remove(fn)==0)
62 {
a) printf("nntFile has been deleted successfully!");
b) goto end2;
63 }
64 else
a) printf("ntError!n");
65 end2: printf("nntPress any key to continue...");
66 getch();
67 }
68 void Append()
69 {
70 printf("ntEnter the file name: ");
71 scanf("%s",fn);
72 fp1=fopen(fn,"r");
73 if(fp1==NULL)
74 {
a) printf("ntFile not found!");
b) goto end3;
75 }
76 while(!feof(fp1))
77 {
a) c=getc(fp1);
b) printf("%c",c);
78 }
79 fclose(fp1);
80 printf("ntType the text and press 'Ctrl+S' to append.n");
81 fp1=fopen(fn,"a");
82 while(1)
83 {
a) c=getch();
b) if(c==19)
c) goto end3;
d) if(c==13)
e) {
f) c='n';
g) printf("nt");
h) fputc(c,fp1);
i) }
j) else
k) {
l) printf("%c",c);
m) fputc(c,fp1);
n) }
84 }
85 end3: fclose(fp1);
86 getch();
87 }
OUTPUT :-
CONCLUSION
Here, I conclude my lines of my term paper on the topic ‘Text Editors’ with the extreme
satisfaction and contentment. This term paper contains brief definition of Text Editor together
with its features and functions.
Added to this, my term paper contains the basic description to Create, Edit, Save,
Delete and Exit from file through C program. It also includes practical implementation of text
editors through complex c program which is created by our group. Also I have sincerely included
the references from where I have made my term paper. This term paper is the outcome of my
hard and laborious work and contains a complete knowledge on the path independent line
integral.
Here, I end my lines with the hope that my term paper will be equally appreciated and
heartily accepted by all. Also, all my faults and mistakes would be forgiven.
REFERENCES :-
 www.cprogramming.com/texteditors.html
 http://en.wikipedia.org/wiki/Text_editor
 http://whatis.techtarget.com/definition/text-editor

Weitere ähnliche Inhalte

Was ist angesagt?

Final project report
Final project reportFinal project report
Final project report
ssuryawanshi
 

Was ist angesagt? (20)

Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
PG LIFE.pptx
PG LIFE.pptxPG LIFE.pptx
PG LIFE.pptx
 
Phonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidPhonebook Directory or Address Book In Android
Phonebook Directory or Address Book In Android
 
Hotel management synopsis
Hotel management synopsisHotel management synopsis
Hotel management synopsis
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Software requirements specification of Library Management System
Software requirements specification of Library Management SystemSoftware requirements specification of Library Management System
Software requirements specification of Library Management System
 
Final project report
Final project reportFinal project report
Final project report
 
Text Editor in System software
Text Editor in System softwareText Editor in System software
Text Editor in System software
 
project-ppt1.pdf
project-ppt1.pdfproject-ppt1.pdf
project-ppt1.pdf
 
VB net lab.pdf
VB net lab.pdfVB net lab.pdf
VB net lab.pdf
 
Presentation LIBRARY MANAGEMENT SYSTEM
Presentation LIBRARY MANAGEMENT SYSTEM Presentation LIBRARY MANAGEMENT SYSTEM
Presentation LIBRARY MANAGEMENT SYSTEM
 
OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]OpenGL Mini Projects With Source Code [ Computer Graphics ]
OpenGL Mini Projects With Source Code [ Computer Graphics ]
 
Swing and AWT in java
Swing and AWT in javaSwing and AWT in java
Swing and AWT in java
 
College Department Management System
College Department Management SystemCollege Department Management System
College Department Management System
 
C# program structure
C# program structureC# program structure
C# program structure
 
Online Quiz System Project Report
Online Quiz System Project Report Online Quiz System Project Report
Online Quiz System Project Report
 
RECURSION IN C
RECURSION IN C RECURSION IN C
RECURSION IN C
 
ExpenseTracker(ppt).pptx
ExpenseTracker(ppt).pptxExpenseTracker(ppt).pptx
ExpenseTracker(ppt).pptx
 
Web controls
Web controlsWeb controls
Web controls
 

Ähnlich wie Text editors project

Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & Mercurial
Widoyo PH
 
Computer Tools for Academic Research
Computer Tools for Academic ResearchComputer Tools for Academic Research
Computer Tools for Academic Research
Miklos Koren
 

Ähnlich wie Text editors project (20)

Design problem
Design problemDesign problem
Design problem
 
Go Programming by Example_ Nho Vĩnh Share.pdf
Go Programming by Example_ Nho Vĩnh Share.pdfGo Programming by Example_ Nho Vĩnh Share.pdf
Go Programming by Example_ Nho Vĩnh Share.pdf
 
pm1
pm1pm1
pm1
 
Bioinformatica 27-10-2011-p4-files
Bioinformatica 27-10-2011-p4-filesBioinformatica 27-10-2011-p4-files
Bioinformatica 27-10-2011-p4-files
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in C
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Django tutorial
Django tutorialDjango tutorial
Django tutorial
 
C language industrial training report
C language industrial training reportC language industrial training report
C language industrial training report
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Computer Project For Class XII Topic - The Snake Game
Computer Project For Class XII Topic - The Snake Game Computer Project For Class XII Topic - The Snake Game
Computer Project For Class XII Topic - The Snake Game
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & Mercurial
 
Student record
Student recordStudent record
Student record
 
Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008
 
Automation tips
Automation tipsAutomation tips
Automation tips
 
You've done the Django Tutorial, what next?
You've done the Django Tutorial, what next?You've done the Django Tutorial, what next?
You've done the Django Tutorial, what next?
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project Management
 
Computer Tools for Academic Research
Computer Tools for Academic ResearchComputer Tools for Academic Research
Computer Tools for Academic Research
 

Kürzlich hochgeladen

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 

Text editors project

  • 1. WAP A C PROGRAM TO CREATE TEXT EDITOR WHICH CONTAIN THE WORKING OF OPEN, SAVE, NEW, EXIT AND RENAME Term paper submitted By To Department of Computer Science and Engineering In partial fulfilment of the Requirement for the CA of Linux Programming To Mr. Sir (December 2013) CONTENTS
  • 2.  INTRODUCTION TO TEXT EDITORS  AKNOWLEDGEMENT  ALGORITHM  SOURCE CODE  OUTPUT  CONCLUSION  REFERENCES INTRODUCTION TO TEXT EDITORS A text editor is used to edit plain text files. Text editors differ from word processors, such as Microsoft Word or WordPerfect, in that they do not add additional formatting information to
  • 3. documents. You might write a paper in Word, because it contains tools to change fonts, margins, and layout, but Word by default puts that formatting and layout information directly into the file, which will confuse the compiler. If you open a .doc file in a text editor, you will notice that most of the file is formatting codes. Text editors, however, do not add formatting codes, which makes it easier to compile your code. Text editors have a feature set different from that of a traditional word processing program. For example, most won't let you include pictures, or include tables, or double-space your writing. The features of text editors vary from implementation to implementation, but there are several kinds of features that most editors have. Below are listed some of the most common and useful features.
  • 4. ACKNOWLEDGEMENT The satisfaction that accompanies the successful completion of any task would be incomplete without the mention of people whose ceaseless cooperation made it possible, whose constant guidance and encouragement crown all efforts with success. I am extremely grateful to my teacher ‘Mr.Sir’ for being a source of inspiration and for her constant support in the design, implementation and evaluation of this term paper. I am thankful to him for his constant constructive criticism and valuable suggestions, which benefited me a lot while developing the term paper on ‘Text Editors’. Through this column, it would be my utmost pleasure to express my warm thanks to him for his encouragement, co-operation and consent as without which I mightn’t be able to accomplish this term paper. I would also like to express my thanks to almighty god for his grace and mercy. Above all, I am extremely thankful to my friends who always remained aside me.
  • 5. ALGORITHM: 1. Display options new, open and exit and get choice. 2. If choice is 1 , call Create() function. 3. If choice is 2, call Display() function. 4. If choice is 3, call Append() function. 5. If choice is 4, call Delete() function. 6. If choice is 5, call Display() function. 7. Create() 7.1 Get the file name and open it in write mode. 7.2 Get the text from the user to write it. 8. Display() 8.1 Get the file name from user. 8.2 Check whether the file is present or not. 8.2 If present then display the contents of the file. 9. Append() 9.1 Get the file name from user. 9.2 Check whether the file is present or not. 9.3 If present then append the file by getting the text to add with the existing file. 10. Delete() 10.1 Get the file name from user. 10.2 Check whether the file is present or not. 10.3 If present then delete the existing file.
  • 6. WAP A C PROGRAM TO CREATE TEXT EDITOR WHICH CONTAIN THE WORKING OF OPEN, SAVE, NEW, EXIT AND RENAME 1 #include<stdio.h> 2 #include<conio.h> 3 #include<process.h> 4 int i,j,ec,fg,ec2; 5 char fn[20],e,c; 6 FILE *fp1,*fp2,*fp; 7 void Create(); 8 void Append(); 9 void Delete(); 10 void Display(); 11 void main() 12 { 13 do { 14 printf("ntt***** TEXT EDITOR *****"); 15 printf("nntMENU:nt-----n "); 16 printf("nt1.CREATEnt2.DISPLAYnt3.APPENDnt4.DELETEnt5.EXITn"); 17 printf("ntEnter your choice: "); 18 scanf("%d",&ec); 19 switch(ec) 20 { a) case 1: b) Create(); c) break; d) case 2: e) Display(); f) break; g) case 3: h) Append(); i) break; j) case 4: k) Delete(); l) break; m) case 5: n) exit(0); 21 } 22 }while(1); 23 } 24 void Create() 25 { 26 fp1=fopen("temp.txt","w");
  • 7. 27 printf("ntEnter the text and press '.' to savennt"); 28 while(1) 29 { 30 c=getchar(); 31 fputc(c,fp1); 32 if(c == '.') 33 { a) fclose(fp1); b) printf("ntEnter then new filename: "); c) scanf("%s",fn); d) fp1=fopen("temp.txt","r"); e) fp2=fopen(fn,"w"); f) while(!feof(fp1)) g) { h) c=getc(fp1); i) putc(c,fp2); j) } k) fclose(fp2); l) break; 34 }} 35 } 36 void Display() 37 { 38 printf("ntEnter the file name: "); 39 scanf("%s",fn); 40 fp1=fopen(fn,"r"); 41 if(fp1==NULL) 42 { a) printf("ntFile not found!"); b) goto end1; 43 } 44 while(!feof(fp1)) 45 { a) c=getc(fp1); b) printf("%c",c); 46 } 47 end1: 48 fclose(fp1); 49 printf("nntPress any key to continue..."); 50 getch(); 51 } 52 void Delete() 53 { 54 printf("ntEnter the file name: "); 55 scanf("%s",fn); 56 fp1=fopen(fn,"r");
  • 8. 57 if(fp1==NULL) 58 { a) printf("ntFile not found!"); b) goto end2; 59 } 60 fclose(fp1); 61 if(remove(fn)==0) 62 { a) printf("nntFile has been deleted successfully!"); b) goto end2; 63 } 64 else a) printf("ntError!n"); 65 end2: printf("nntPress any key to continue..."); 66 getch(); 67 } 68 void Append() 69 { 70 printf("ntEnter the file name: "); 71 scanf("%s",fn); 72 fp1=fopen(fn,"r"); 73 if(fp1==NULL) 74 { a) printf("ntFile not found!"); b) goto end3; 75 } 76 while(!feof(fp1)) 77 { a) c=getc(fp1); b) printf("%c",c); 78 } 79 fclose(fp1); 80 printf("ntType the text and press 'Ctrl+S' to append.n"); 81 fp1=fopen(fn,"a"); 82 while(1) 83 { a) c=getch(); b) if(c==19) c) goto end3; d) if(c==13) e) { f) c='n'; g) printf("nt"); h) fputc(c,fp1); i) } j) else
  • 9. k) { l) printf("%c",c); m) fputc(c,fp1); n) } 84 } 85 end3: fclose(fp1); 86 getch(); 87 } OUTPUT :-
  • 10.
  • 11. CONCLUSION Here, I conclude my lines of my term paper on the topic ‘Text Editors’ with the extreme satisfaction and contentment. This term paper contains brief definition of Text Editor together with its features and functions. Added to this, my term paper contains the basic description to Create, Edit, Save, Delete and Exit from file through C program. It also includes practical implementation of text editors through complex c program which is created by our group. Also I have sincerely included the references from where I have made my term paper. This term paper is the outcome of my hard and laborious work and contains a complete knowledge on the path independent line integral. Here, I end my lines with the hope that my term paper will be equally appreciated and heartily accepted by all. Also, all my faults and mistakes would be forgiven. REFERENCES :-  www.cprogramming.com/texteditors.html  http://en.wikipedia.org/wiki/Text_editor  http://whatis.techtarget.com/definition/text-editor