0

I'm looking at the built-in methods that C has, like fread(). I'm wondering what search algorithm fread() uses to return the number of bytes from a file? I looked on Google, and it says "it performs sequential, buffered binary input," but I don't know exactly what that means.

7
  • 4
    It doesn't need a 'search algorithm'. It simply returns the number of bytes read. No searching required. Commented 4 hours ago
  • but doesnt it have to find how many bytes are in ur file? Commented 4 hours ago
  • 1
    @booboobearboy283 "but doesnt it have to find how many bytes are in ur file?" -- Think about what you are asking. If you buy an unlabeled box of cookies, how can you find how many cookies are in the box? Would you "search" for cookies or would you count them? Commented 4 hours ago
  • will counting the cookies takes time right so wold that be o(n)? Commented 4 hours ago
  • @booboobearboy283 what is o(n)? Commented 3 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.