Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling large input sets in C

 
Rachit Kumar Saxena
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to handle large input sets,of the order of 10^100 in C?
 
Campbell Ritchie
Sheriff
Posts: 48396
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I presume you mean 10¹⁰⁰? he answer is the same as “how do you eat an elephant”? One byte at a time. You would have to get that dataset into a Stream, which would probably be larger than the whole of the known universe, and read it sequentially. Don't panic if the program hasn't terminated after twenty minutes
 
Rachit Kumar Saxena
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir any links to any code illustrating the above concept?
 
Campbell Ritchie
Sheriff
Posts: 48396
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Afraid not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic