Friday, 1 June 2018

File Handling in C language READ operation

#include <stdio.h>
main()
{

   FILE *fp;
   char buff[255];//creating char array to store data of file
 
   fp = fopen("C:\\Users\\salman\\Desktop\\c-lang\\lect-14\\files\\salman.txt", "r");
   
   while(fscanf(fp, "%s", buff)!=EOF)
   {
   
   printf("%s ", buff );
 
   }
   fclose(fp);
}

No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...