470,858 Members | 1,977 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,858 developers. It's quick & easy.

How to read single line from a file?

Hi to all,

i want to develop a function which read the single line from any file and display on the output screen.please give me some suggestion how i do this .....

Dec 12 '07 #1
2 5138
Please do some reading before your ask such question.

However, i can give you some hints on this. Use fgets(), fread() etc
Dec 12 '07 #2
see it depends on the file you are trying to read binary file or text file
syntax on fread() is googleable and it is also simple
my program uses fgetc and fputc
Expand|Select|Wrap|Line Numbers
  1. int main()
  2. {
  3. <spoonfeeding code removed by weaknessforcats>
  4. }
Dec 12 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Chuck Anderson | last post: by
2 posts views Thread by kak3012 | last post: by
4 posts views Thread by yo_mismo | last post: by
35 posts views Thread by RyanS09 | last post: by
1 post views Thread by Quinn | last post: by
7 posts views Thread by Hallvard B Furuseth | last post: by
2 posts views Thread by sk.rasheedfarhan | last post: by
15 posts views Thread by waltbrad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.