0
read text file in flash drive when inserted
Can someone please give me an idea on how will I read a text file on a flash drive using a file handling in C language. I've been searching a lot but it's kind of complicated to me.
1 Respuesta
+ 7
Lean
For what purpose are you reading the file? see
if you are not going to use the data in it, then why bother reading it at all?
If you are counting how many times each letter appears, you read it different to reading a list of numbers.
Likewise if you just want to copy the file, you don't care about line endings. Or even if it is text at all!..
If it's not like that then kindly phrase the question in different manner..so might I can help!
although in short you call fopen() to open the file, fread() to read the file until there is no more data to read, then call fclose() to close the file.
Hope helps ✌️