file handling

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sukanya007
    New Member
    • Jan 2008
    • 1

    file handling

    give me examples of opening file in append mode in c
  • Savage
    Recognized Expert Top Contributor
    • Feb 2007
    • 1759

    #2
    Originally posted by sukanya007
    give me examples of opening file in append mode in c
    Here you go

    Savage

    Comment

    • sicarie
      Recognized Expert Specialist
      • Nov 2006
      • 4677

      #3
      This will also be useful to you next time you post.

      Comment

      • sbvishal
        New Member
        • Sep 2007
        • 6

        #4
        First of all open a file using the file pointer.

        As I know if the file does not exist then after opening it in append mode it wil be created.

        Lets take a look

        main()
        {
        FILE *fp;
        fp=fopen("testf ile.txt","a");//it will open file in append mode if not working use a+ //in place of a.
        //Now file is opened

        fclose(fp);
        }

        Comment

        Working...