R
Richard Heathfield
Umesh said:
No such header.
//multiplication table version 2
#include<iostream.h>
No such header.
//multiplication table version 2
#include<iostream.h>
I frequently do and have done so.
But the pollution level in this NG is second to none.
Killfile me for all I care. I really don't mind.
I would also suggest you add posters whose net nanny to help ratio is
more than 1:1.
Martin Ambuhl said:Guru said:a^=b^=a; // could be still better than 3 statements.
No, it is horrid. The OP poster asked about swapping two number
[sic]. The '^' operator requires operands of an integer type. And
Don't be so ridiculous.
Students who come here asking these type of questions are rarely in the
position to slap their lecturers.
Mark said:This has been tried in the past, many times, and found disastrous.
Chris Dollin said:Umesh wrote:
NOT C.
Here, we are for C. C. C. Not not-C.
Christopher said:After that post, and given that "Umesh" is posting from an e-mail
address called "fraternitydisposal", I find it less credible that the
entity is not a troll.
Martin Ambuhl said:Is this Richard just incredibly stupid or is he a troll?
[...]Chris Hills said:The whole point of this code is that if the student uses it without
understanding it they will get spotted as a CHEAT
Why not create a NG comp.lang.c.homework?
We can point the posters to
this newsgroups (and hopefully get rid of them) and maybe some of them
will post there directly, and people who like to show off can post
solutions in there. The best would be that those "students" start
helping each other out (I know, the chance of this happening are
almost NULL).
Richard said:Is this a new record?
14 posts.
9 of them are discourteous warnings about posting style, homework and
things being off topic.
Ok, we nominate you the person to reply to homework questions! Oh, wait.Richard said:The why dont "we" agree that only ONE reply is enough. Why is there the
constant feeding frenzy. Leave it alone to see if someone else replies
or ignore it.
Naive attempt:vubaboota said:I HAVE SOME SERIOUS PROBLEM , HOW TO MAKE A PROGRAM IN C
Q1:
Write a program using malloc function. In which you take input from
user and allocate memory equal to square of this number. Which
multiply numbers and draw a table in the following format?
Martin Ambuhl said:
Guru Jois wrote:No, it is horrid. The OP poster asked about swapping two number
[sic].
The '^' operator requires operands of an integer type. And that's
not
all that's wrong with it. This question has been beaten to death
before. If you really are committed to the silly XOR trick, check the
FAQ and the newsgroup archives to find out why you shouldn't be. You
might also find out why, even when the silly XOR trick works, writing
it as a single statement is a bad idea.
And if he must do this really stupid thing, he ought at least to do this
really stupid thing properly. The above is broken in more than the
usual number of ways.
Martin, I note from your reply and from another in this thread that both
Umesh and Guru Jois have started dispensing idiotic C advice. I guess
it's time for them to come *out* of my killfile. Things have come to a
pretty pass when one actually feels obliged to unplonk people for being
even more stupid than normal.
If I'm wrong, I welcome the comment/objection from experts, b'cause I
always think - " learn from seniors ".
Richard Heathfield said:Guru Jois said:
Okay, let's see if that's true.
4) the expression you gave is undefined because it violates a "shall"
that is not a constraint: "Between the previous and next sequence point
an object shall have its stored value modified at most once by the
evaluation of an expression. Furthermore, the prior value shall be
accessed only to determine the value to be stored."
Martin said:No, it is horrid. The OP poster asked about swapping two number [sic].
The '^' operator requires operands of an integer type. And that's not
all that's wrong with it. This question has been beaten to death
before. If you really are committed to the silly XOR trick, check the
FAQ and the newsgroup archives to find out why you shouldn't be. You
might also find out why, even when the silly XOR trick works, writing it
as a single statement is a bad idea.
The problem is it has got a LOT worse over the last 2-3 years. It is
getting like spam.
Ben Bacarisse said:I don't follow this last one. I am quite prepared to believe that I
am misunderstanding the phrase, but I am simply not seeing it.
a and b have their stored value modified only once (assuming a sequence
point just prior to this, of course) and to me reading of the prior
value of both a and b are used only to determine the value stored.
What have I missed?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.