SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
Tech_MX
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
Ganga Ram
 

Mais procurados (20)

Visual Basic Programming
Visual Basic ProgrammingVisual Basic Programming
Visual Basic Programming
 
Phone book with project report for BCA,MCA
Phone book with project report for BCA,MCAPhone book with project report for BCA,MCA
Phone book with project report for BCA,MCA
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Form Handling using PHP
Form Handling using PHPForm Handling using PHP
Form Handling using PHP
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
C programming
C programmingC programming
C programming
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
C language ppt
C language pptC language ppt
C language ppt
 
Text Editor in System software
Text Editor in System softwareText Editor in System software
Text Editor in System software
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
GUI programming
GUI programmingGUI programming
GUI programming
 
Shell programming
Shell programmingShell programming
Shell programming
 
CLASS OBJECT AND INHERITANCE IN PYTHON
CLASS OBJECT AND INHERITANCE IN PYTHONCLASS OBJECT AND INHERITANCE IN PYTHON
CLASS OBJECT AND INHERITANCE IN PYTHON
 
Strings
StringsStrings
Strings
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 

Semelhante a 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
 

Semelhante a 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
 

Último

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Último (20)

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
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
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 ...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 

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