put on hold as off-topic by 200_success♦ 15 mins ago

This question appears to be off-topic for this site. While what’s on- and off-topic is not always intuitive, you can learn more about it by reading the help center. The users who voted to close gave this specific reason:

  • "Questions containing broken code or asking for advice about code not yet written are off-topic, as the code is not ready for review. After the question has been edited to contain working code, we will consider reopening it." – 200_success

If this question can be reworded to fit the rules in the help center, please edit your question or leave a comment.

I cannot imagine in the darkest reaches of my mind any usefulness to such responses. A great wise man once quipped, "There are no wrong questions." Why do I keep being told what questions to ask? Limiting questions limits answers, which limits freedom. Of what use to me or you is this frustration?

Related main-site question (now deleted by owner, requires 2K reputation (10K after graduation) to see):

  • \$\begingroup\$ Have you read the link in the off-topic message? \$\endgroup\$ Commented Dec 1, 2014 at 20:53
  • \$\begingroup\$ Which link? This again is another frustration-- too many links. \$\endgroup\$
    – rayman may
    Commented Dec 1, 2014 at 20:55
  • 6
    \$\begingroup\$ It's often not What questions to ask but more often Where to ask them. Sorry that you feel your experience has been disappointing, hopefully some trusted users can chime in and answer you. \$\endgroup\$
    – Phrancis
    Commented Dec 1, 2014 at 20:58
  • 8
    \$\begingroup\$ Limiting questions makes the site's scope more well-defined, making the site more useful. Ever wonder why no unscoped code forum is nearly as popular as StackExchange? \$\endgroup\$
    – nhgrif
    Commented Dec 1, 2014 at 20:58
  • \$\begingroup\$ This link is most relevant to your particular question. It details what to do if your question was closed for containing broken code. \$\endgroup\$
    – RubberDuck
    Commented Dec 1, 2014 at 20:59
  • \$\begingroup\$ Limits keep things from going off topic. \$\endgroup\$
    – JaDogg
    Commented Dec 6, 2014 at 14:27

4 Answers 4


"There are no wrong questions."

Actually, I believe the phrase is that there are no bad questions, but the thing is, I have to disagree — at least in the context of a question and answer site.

The phrase "There are no bad questions" is meant to encourage one who does not know to ask rather than to continue on in ignorance.

But the phrase also doesn't mean that every question is appropriate for every venue and audience. Every Stack Exchange site has a What topics can I ask about here? page that lists the types of questions that are allowed.

The question:

How do I begin writing code?

isn't a bad question. And if anyone were to ask me this in my every day life, I'd love to take some time to help them learn how to start programming.

But I hope we can agree that it's an absolutely abysmal question to be asked on Code Review. It's not a question that's appropriate on any Stack Exchange site, to my knowledge.

So the thing is, there ARE bad questions on the Stack Exchange. There are multiple things that can make a question bad, and for virtually every one of these reasons that a question might be bad, there exists a vote-to-close option for that reason.

And why do we not want to see bad questions asked? Because bad questions have a hard time fostering good answers.

Stack Exchange isn't a web forum, chat room, or a personal help hotline where an entire community of professionals and enthusiasts gather and wait around for you to bring problems for them to fix. No. It's a question and answer site — a FAQ if you will — for the various topics that spawn the various Stack Exchange sites. The value of Stack Exchange isn't that person A asks a question and person A gets his answer. The value of Stack Exchange is that person A asks a question and persons B, C, and D answer because they've been in the exact scenario before and know what to do, and then persons E-Z later come across this well formulated question and set of detailed answers with appropriate up/down voting which should signify their accuracy/usefulness, and person E-Z can benefit from the accumulative knowledge shared on a question asked by person A.

When a question is closed on the Stack Exchange, it's for the benefit of persons E-Z, not to punish person A.

When bad questions that don't encourage good answers are closed, there's far less muck for persons E-Z to wade through in order to actually find some very, very good information.


Code Review, like all Stack Exchange sites, limits questions to a certain topic. As stated on our tour and on-topic pages, the goal of Code Review is to take working code and make it better. Your question was asking about how to fix broken code, and was thus off-topic. There is a link in the off-topic message giving some general advice about what to do for broken code.

To be more specific in your case, you have some significant compiler warnings, which you must have seen when you ran the compiler as you stated:

$ gcc -Wall -g -o iwlmem iwlmem.c
iwlmem.c: In function ‘getblksize’:
iwlmem.c:14: warning: format ‘%c’ expects type ‘int’, but argument 2 has type ‘char *’
iwlmem.c:14: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 3 has type ‘char *’
iwlmem.c:14: warning: format ‘%8x’ expects type ‘unsigned int’, but argument 4 has type ‘char **’
iwlmem.c: In function ‘main’:
iwlmem.c:49: warning: initialization makes integer from pointer without a cast
iwlmem.c:55: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘int *’
iwlmem.c:55: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘int’

I suggest that you start by fixing each of those problems first. Use Stack Overflow as a resource if you need help interpreting a particular type of compiler warning (but don't expect Stack Overflow to debug the entire program for you, if you ask the same question you asked here).


The point is not to limit questions, but to group related questions together. Stack Overflow contains a huge repository of common and uncommon problems in code and answers detailing how to fix them. Code Review is a repository of working code that and pointers about how to improve it. This way, if you have a problem, you research Stack Overflow and get relevant answers, while if you want to know how to improve your working code, you come to Code Review and get relevant answers. While Stack Exchange has a huge list of sites (http://stackexchange.com/sites#), some graduated, some in beta, not every possible topic is covered. If you find a topic that is not covered, you can always propose a site at Area 51: http://area51.stackexchange.com/

  • \$\begingroup\$ I can't agree entirely with "the point is not to limit questions". It is. There's not a StackExchange site for every possible topic, at least not yet. \$\endgroup\$
    – nhgrif
    Commented Dec 1, 2014 at 21:15
  • \$\begingroup\$ As I said, @nhgrif, if there is not a site for your question, propose one at Area 51. \$\endgroup\$
    – user34073
    Commented Dec 1, 2014 at 21:16
  • 2
    \$\begingroup\$ Right, but whether or not the question gets closed here has nothing to do with the existence of another appropriate SE site. Moreover, we close a lot of questions that this is probably the best site for but the question has problems. \$\endgroup\$
    – nhgrif
    Commented Dec 1, 2014 at 21:17
  • \$\begingroup\$ @nhgrif Yes, I was attempting to show that it is actually less frustrating to group questions by closing off-topic questions than just have one mega-exchange site. \$\endgroup\$
    – user34073
    Commented Dec 1, 2014 at 21:20

You could probably ask something like the following on Stack Overflow:

Why doesn't test equal SIZE1 when called with 1 as the first argument?


int main(int argc, char **argv) {
    char *test = argv[1];

    const char *SIZE1 = "1";

    if (test == SIZE1){
    } else {

It also wouldn't hurt to show them example output with various arguments.

They prefer stripped down examples, as their answers tend to be narrower than ours.

Apologies if I messed up somewhere. I don't have a C compiler installed at the moment. After you get your code working, you can post it back on our site for the kind of feedback that we provide.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .