Click here to Skip to main content
15,891,796 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello everyone.. I need a C implementation for FILE divides into blocks and Each Block divides into 4KB. How can I divide the block into fixed size (i.e 4kb).. Please anyone give me solution for my problem.... I need C implementation..
Thank you...
Posted
Comments
Sergey Alexandrovich Kryukov 17-Feb-15 1:50am    
Huh?
—SA
Member 11449136 17-Feb-15 1:53am    
what is it mean???
enhzflep 17-Feb-15 1:59am    
That's exactly what "Huh?" means.
Sergey Alexandrovich Kryukov 17-Feb-15 2:04am    
Sorry for confusing you. It means a general question, interjection: it's not clear what you are even talking about.
—SA
Kornfeld Eliyahu Peter 17-Feb-15 2:05am    
It means that your question is not a question at all!!!
Each block of what? What happens if you can't slice your 'what' into blocks of 4 Kb each?
And also: What have you tried?[^]

1 solution

This is what you need:
http://www.cplusplus.com/reference/cstdio/fread[^],
http://www.cplusplus.com/reference/cstdio/fopen[^],
http://www.cplusplus.com/reference/cstdio/fclose[^].

And, if you also need to read your data chunks in other files, you may need this: http://www.cplusplus.com/reference/cstdio/fwrite[^].

I referenced some help pages from C++ help, but don't be confused: it is also applicable to C.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900