News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Probelms with character variable

Started by bstaletic, March 15, 2014, 08:55:25 PM

Previous topic - Next topic

bstaletic

Hello everyone,
I recently started programing in C, and I use code::blocks to satisfy my needs.
When I use scanf to asign a character to a variable, and than printf to check if all went fine, it just show blank.
The same is when I use printf to display character that has not been entered, but this is expected.

I uploaded the siplest code where I could encounter this problem. If I made a mistake in code please tell me, if not what is the problem?

Jenna

Please (re-?)read the rules.
When registering here you accepted to follow these rules !!
Quote from: MortenMacFly on January 24, 2009, 09:14:54 PM
This post is here to assist you in your Code::Blocks / C++ blues, by telling you what NOT to do. This is not to frighten you, but unfortunately we have to be that strict due to continuous mis-use and dis-respect.

1. This is NOT a general programming board. "How do I write a program that....", "Can anybody teach me how to", "I have this homework", "My program doesn't run and I don't have the slightest idea of why because I'm a C++ newcomer", "What is a compiler", "What does gcc do" is the kind of questions that is FORBIDDEN to ask.
[...]
Finale note: Ignoring these rules may result in the topic being (silently) locked and/or even removed completely without any notice.

In case you wonder why we are so strict: I could say: "Search the forum" - as this has been discussed a lot. To make is short: By law we (the devs/moderators) are responsible for the content of our forum. This means we need to read all posts. If you want us to continue the development of C::B and have the time to answer some of the questions that are really related to C::B, apply the rules above. It's obviously a matter of time for us.

More general help how to use our forum you'll find here, too.

Topic locked and attachement deleted !