stuck in a program that asks to do the following any help would be greatly appeciated
write a program that inputs a line of text with function gets into char array s[ 100 ]. Output the line in uppercase letters and lowercase letters.
stuck in a program that asks to do the following any help would be greatly appeciated
write a program that inputs a line of text with function gets into char array s[ 100 ]. Output the line in uppercase letters and lowercase letters.
You'll need to #include <stdio.h> to use gets().
Seriously, do you try to do anything on your own? There's a big announcement right at the top of this forum about homework questions.
http://cboard.cprogramming.com/annou...ouncementid=39
If you understand what you're doing, you're not learning anything.
get your flame suit itsme86
For the love of all that is good in the world don't ues gets(). use fgets(). Please the children of the world beg you!
Oh sure edit your post while I compose mine. Meanie!
nevermind the help... sorry to bother
> You'll need to #include <stdio.h> to use gets().
*weeps*
*looks at the post count - nearly 1000*
*sobs*
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
He was asking for "any help." I didn't feel like getting into the whole "gets() is dangerous" discussion since it was obvious he was just looking for a free ride.
But YES! I know gets() is dangerous and I never use it. Okay?
If you understand what you're doing, you're not learning anything.
i think i have the gets() avatar right? i'll post now then. it seems appropriate.
hello, internet!
If only there was some way other than post count to judge someone's reputation. Like if someone suggested gets() all the time, they'd be identified with a bright red box. Hmmm, I wonder if there's anything like that?Originally Posted by Salem
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
I wasn't suggesting gets(). The OP said the requirement was to use gets() so I was being pseudo-helpful by telling the OP to #include <stdio> in order to use it. I'd never suggest gets(). In fact, if you do a search on the board you'll see I've suggested against using gets() several times.
If you understand what you're doing, you're not learning anything.