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.
Printable View
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
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*
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? :)
i think i have the gets() avatar right? i'll post now then. it seems appropriate.
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?Quote:
Originally Posted by Salem
:p
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.