@Navin : Read a line .. store it in a string .. then extract numbers frm it.. It will be more faster i think.. :) On Wednesday, 4 July 2012 22:44:04 UTC+5:30, Navin Kumar wrote: > > Suppose a file.txt contains : 50 40 30 # # 5 # 10 # # > > i want to fetch only integers. How should i fetch it. I tried with fgetc > and fscanf but it was too complicated. > > My approach: fetched one word at a time and put it into separate string > and then i converted that string to integer(if each character of that > string was between '0' to '9'). > > Is there any simple way to do this. > >
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/sR5uBPpS2HQJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.