944,137 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 589
  • C RSS
Oct 26th, 2009
0

I/O function misunderstanding

Expand Post »
Hi everyone. I am so confused in input and output! I'm following what it looked to be a nice tutorial from VTC and it shows how to use scanf and printf.
But i'm seeing everywhere things like printf and scanf and getc, getch, puts, gets...wtf? I learnt the diff between getc and getch, but i dont know which one should i use, why one is better than another...
In the other hand in this video he's using c = getchar() to get letters from the keyboard being c an integer?!
I also don't know what's exactly a buffer, when to flush it, and how this exactly works.

Pointers went good but i'm really stuck with i/o functions. Can anyone point a good tutorial/manual/video/examples of these so i can learn this issue for once? It's no problem if it's too extense or detailed, i want to understand it from the lowest.

Thank you!
Last edited by neithan; Oct 26th, 2009 at 1:23 pm.
Similar Threads
Reputation Points: 12
Solved Threads: 2
Junior Poster in Training
neithan is offline Offline
75 posts
since Oct 2009
Oct 26th, 2009
0
Re: I/O function misunderstanding
I/O is kind of complicated in C. Can you list out your questions so that it is easier to answer them? I will be happy to give you all of the details you want, but right now it feels like I would end up writing a small book.
Reputation Points: 1446
Solved Threads: 135
Practically a Master Poster
Tom Gunn is offline Offline
681 posts
since Jun 2009
Oct 26th, 2009
0
Re: I/O function misunderstanding
Click to Expand / Collapse  Quote originally posted by Tom Gunn ...
I/O is kind of complicated in C. Can you list out your questions so that it is easier to answer them? I will be happy to give you all of the details you want, but right now it feels like I would end up writing a small book.

Well, that would be nice but that's why i asked for manuals etc because i think i'm gonna need a lot of info to really learn the I/O in C.
I mean i don't have an exact question, is the whole issue that i want to know and i havent found anything that covered all of them and explained nicely why and how to use each of them.

Really isn't there any guide or something to master something that important in C like it is I/O?

Thank you for your time!
Reputation Points: 12
Solved Threads: 2
Junior Poster in Training
neithan is offline Offline
75 posts
since Oct 2009
Oct 27th, 2009
0
Re: I/O function misunderstanding
Moderator
Reputation Points: 3281
Solved Threads: 895
Posting Sage
WaltP is offline Offline
7,749 posts
since May 2006
Oct 27th, 2009
0
Re: I/O function misunderstanding
Oh, google, how didn't i though of that?

I actually googled that before asking but i found C++, file input output or incomplete information in plain C I/O that's why i asked if you happen to know a good resource.
Reputation Points: 12
Solved Threads: 2
Junior Poster in Training
neithan is offline Offline
75 posts
since Oct 2009
Oct 27th, 2009
0
Re: I/O function misunderstanding
Click to Expand / Collapse  Quote originally posted by neithan ...
Oh, google, how didn't i though of that?
Google: the response to much and the answer to nothing.
Aia
Reputation Points: 2224
Solved Threads: 218
Nearly a Posting Maven
Aia is offline Offline
2,304 posts
since Dec 2006
Oct 27th, 2009
2
Re: I/O function misunderstanding
>Google: the response to much and the answer to nothing.
If you can't find complete information about I/O in C from google, you're either an idiot or a liar. It's easier just to say that you were too lazy to do a thorough search and need someone to point you to the one true reference.
Last edited by Narue; Oct 27th, 2009 at 7:48 pm.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Oct 27th, 2009
0
Re: I/O function misunderstanding
>If you can't find complete information about I/O in C from google, you're either an idiot or a liar.
Does it have to be so binary?
Aia
Reputation Points: 2224
Solved Threads: 218
Nearly a Posting Maven
Aia is offline Offline
2,304 posts
since Dec 2006
Oct 28th, 2009
0
Re: I/O function misunderstanding
Click to Expand / Collapse  Quote originally posted by Aia ...
Does it have to be so binary?
It seems that is. Although Narue forgot to mention a beginner once failed seeking a very specific resource by himself in a subject he is totally new to.

Click to Expand / Collapse  Quote originally posted by Narue ...
>Google: the response to much and the answer to nothing.
If you can't find complete information about I/O in C from google, you're either an idiot or a liar. It's easier just to say that you were too lazy to do a thorough search and need someone to point you to the one true reference.
Yes that seems to be what i was looking for. It's a shame that you think insulting people makes you look smarter, though. Maybe next time you improve your spotting system of trolls and avoid embarrassing yourself like that.
Reputation Points: 12
Solved Threads: 2
Junior Poster in Training
neithan is offline Offline
75 posts
since Oct 2009
Oct 28th, 2009
2
Re: I/O function misunderstanding
>>If you can't find complete information about I/O in C from google, you're either an idiot or a liar.
>Does it have to be so binary?

In my experience, yes.

>Although Narue forgot to mention a beginner once failed seeking
>a very specific resource by himself in a subject he is totally new to.

No, Narue just skipped to the end result of providing the best possible reference. I could easily show you that a braindead google search string would result in enough information on the subject to fill the Library of Congress. But I didn't want to embarrass you too much by proving that the only person who can't find complete information on google is too stupid to be a programmer, or didn't actually search google.

>It's a shame that you think insulting people makes you look smarter, though.
You have no idea what I'm thinking, so please keep those faux omniscient statements to yourself.

>Maybe next time you improve your spotting system of trolls and avoid embarrassing yourself like that.
It takes quite a bit more than a whiney noob to embarrass me. Also note that I never called you a troll. I'm not sure where that came from. Trolls have completely different behavior patterns.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: pass excel sheet in linux C using libxls
Next Thread in C Forum Timeline: open file as soon asyou run a command. How?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC