Join Our Email Alerts-Subscribe
Important Note:Login & Check Your Email Inbox and Activate Confirmation Link


Enter Your Email :

Copyright Disclaimer:
Section 107 of the Copyright Act Fair Use Contents .
We are forwarding content link(s) from our website to content website & We are not serving any contents.
Main Source:Google.com.All the Content PDF link(s) is/are obtained from GoogleSearch
for the purpose of Education & Teaching Intention. Not for commercial purpose.
Technicalsymposium.com is not liable/responsible for any copyright issues.


Linux Materials-Free Download

#include stdio.h

#include sys/types.h

#includesys/stat.h

#include fcntl.h

int n,n1,nn,nn1,m,nn2,nn3,nn4;

main()

{

char fname[50];

char oldfile[50];

char newfile[50];

char con[100],con1[100];

do

{

printf("1-Create\n");

printf("2-Write\n");

printf("3-Read\n");

printf("4-Copy\n");

printf("5-MERGE\n");

printf("Enter your choice:\n");

scanf("%d",&m);

switch(m){

case 1: printf("Create New:\n");

printf("Enter the File Name:\n");

scanf("%s",fname);

n=creat(fname,00777);

if(n<0){

printf("ERROR File not Created\n");

}

else

{

printf("Successfully Created\n");

}close(n); 

break;

case 2: printf("WRITE\n");

printf("Enter the File Name:\n");

scanf("%s",fname);

n = open(fname,O_WRONLY);

if(n<0)

{ printf("ERROR\n");

}

else

{

printf("Enter the Content:\n");

scanf("%s",con);

n1 = write(n,con,100);

}

close(n);

break;

case 3: printf("READ\n");

printf("Enter the File Name:\n");

scanf("%s",fname);

n=open(fname,O_RDONLY);

n1 = read(n,con,100);

if(n1<0)

{ printf("ERROR\n");

}

else

{

printf("%s",con);

}

close(n);

break;

case 4: printf("\nCOPY");

printf("Enter the New File Name:\n");

scanf("%s",fname);

n = creat(fname,00777);

if(n<0)

{

printf("Error File Not Created\n");

}

else

{

printf("Successfully Created");

}

close(n);

printf("Enter the Old File Name\n");

scanf("%s",oldfile);

n = open(oldfile,O_RDONLY);

n1 = read(n,con,100);

if(n1<0)

{

printf("ERROR");

}

else

{

printf("%s",con);

}

printf("Enter the New File Name\n");

scanf("%s",newfile);

nn = open(newfile,O_WRONLY);

if(nn<0)

{

printf("ERROR");

}

else

{

nn1 = write(nn,con,100);

}

close(n);

close(nn);

break;

case 5: printf("Merge\n");

printf("Enter First File Name:");

scanf("%s",fname);

n = open(fname,O_RDONLY);

n1 = read(n,con,100);

if(n1<0)

{

printf("ERROR...");

}

else

{

printf("%s",con);

}

printf("Enter the Second File:\n");

scanf("%s",oldfile);

nn = open(oldfile,O_RDONLY);

nn1 = read(nn,con1,100);

if(nn1<0)

{

printf("ERROR");

}

else

{

printf("%s",con1);

}

printf("Enter the New File NAME:");

scanf("%s",newfile);

nn2 = creat(newfile,00777);

if(nn2<0)

{

printf("ERROR");

}

else

{

nn3 = write(n,con,100);

nn4 = write(nn1,con1,100);

}

close(n);

close(n1);

close(nn);

close(nn1);

close(nn2);

close(nn3);

close(nn4);

break;

}

}while(m<=5);

}

Source: Contents are provided by Technicalsymposium Google Group Members. 
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members. 
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.


Fresher Jobs & IT Jobs and Off-Campus

Programming & Projects PDF

Conferences & Symposium Details

B.E/Medical Lecture Notes PDF

GRE/TOEFL/IELTS/GMAT/SAT Notes

Aptitude/Placement Papers

Technicalsymposium.com-Contents

Technicalsymposium.com-Contents

Conference & Symposium Details

Government Jobs Details

Off-Campus Interviews & Walk-in/Career Pages

Software Jobs and IT Jobs Details

Bank Jobs & PO/Clerk Jobs Preparation Books PDF

Bank Quick Study Notes & Question Papers PDF

IES Syllabus & Question Papers-Free Download

Placement Papers with Answers PDF

Aptitude Study Notes & Puzzles PDF

Technical Interview Questions with Answers PDF





Technicalsymposium.com-Contents

Technicalsymposium.com-Contents

BE/B.Tech/M.Sc & B.Sc & Commerce Lecture Notes-Free Download

Engineering Maths Lecture Notes-Free Download

GRE Study Materials & Notes-Free Download

TOEFL Study Materials-Free Download.

IELTS Study Materials & ebooks-Free Download

GMAT Study Materials-Free Download

SAT Study Materials & ebooks-Free Download

Engineering Physics Lecture Notes-Free Download





Technicalsymposium.com-Contents

Technicalsymposium.com-Contents

Resume Formats and Resume Writing Tips

Group Discussion Topics & Answers

HR & Situational and Behavioral Interview Questions & Answers

General Job Interviews Materials-Free Download

Engineering Chemistry Lecture Notes-Free Download

Anna University Question Papers and Study Notes PDF

Programming & Manuals and Projects PDF

GATE Question Papers and Study Materials & ebooks PDF

All Engineering ebooks & Study Notes PDF

Paper Abstracts and Conference Papers PDF