"Albert" <al*****************@gmail.com> writes:
You're complete utter bu**sh**.
Have you ever bothered reading The C Programming Language by K&R
before? There's an exercise on this and I simply don't know how to do
it and you expect me to write what I've tried - never heard of such sh**
[quotation edited for offensive language]
Here's some friendly advice.
First, read <http://cfaj.freeshell.org/google/> and follow its advice.
Second, if you're going to ask for help with a problem, you need to
define unambiguously what the problem is. Your original question was:
how do i write a program that outputs its input if its input is more
than 80 characters?
This is extraordinarily ambiguous. With a little effort, I could
probably think of at least half a dozen mutually inconsistent
interpretations for this -- and I suspect none of them would match
what you actually meant. Do you mean more than 80 character per line
or more than 80 characters total? What should the program do if the
input isn't more than 80 characters? And so on. Rather than wasting
our time trying to guess what you really meant, several people asked
you to clarify your question -- and you never bothered to do so.
Are you saying this is an exercise in K&R? I don't recall seeing it.
If it's there, I'm reasonably certain K&R worded it much more
precisely. Can you provide an exercise number? Is it from the first
edition or the second?
Your question looks very much like a homework assignment. I don't
know whether it is or not. A lot of people post their homework
questions here and expect us to do their work for them; we are
understandably reluctant to do so. After all, the point of homework
is for the student to learn something by doing the work himself.
If we knew what you were looking for, we could almost certainly write
a C program that meets your requirements -- but then we wouldn't need
you, would we?
The best way for you to learn is to try to write the code yourself.
If you're having problems with it, we can help you. If you can't do
that, perhaps programming is not for you. We're not going to
spoon-feed you the solution.
If you're going to insult people who you're asking for help, you're
not going to get much help. Because of your whining, you're almost
certainly already in a number of killfiles; one stupid little tirade
can be enough to permanently damage your ability to get help here. I
see that some of the regulars are replying to you in other threads, so
maybe you haven't *quite* shot yourself in the foot. But I, for one,
will certainly be less inclined to help you in the future unless you
change your behavior.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.