U
Umesh
please help. thanks.
Umesh said:please help. thanks.
Umesh said:please help. thanks.
please help. thanks.
Jens Thoms Toerring said:I would like to, but:
1) please put your question into the body of your posting,
2) please phrase your question in a way that it makes some
sense.
How to print "\n" or '\0'
doesn't.
Regards, Jens
The OP is building quite a reputation for idiotic posts and ignoring advice.Eigenvector said:I'm amazed that only one person answered the question, while the rest of you
were overly concerned about specific structuring of the body of his post and
specific requirements for the wording.
I'm amazed that only one person answered the question, while the rest
of you were overly concerned about specific structuring of the body of
his post and specific requirements for the wording.
Not to mention that the one person answered only one of the manyIan said:The OP is building quite a reputation for idiotic posts and ignoring advice.
//how to print "\n" or '\0'
#include"stdio.h"
Peter said:Groovy hepcat Umesh was jivin' on 26 May 2007 09:25:29 -0700 in
comp.lang.c.
Re: How to print "\n" or '\0''s a cool scene! Dig it!
Now, I know you know better than that, Umesh. You must be trolling,
I think. The only explanation I can think of for your baffling
behaviour is that you are a troll.
That said, the only reason I'm responding to a troll is to encourage
others to ignore Umesh, and all trolls. Killfile the fool.
Harald van D?k said:#include "stdio.h" is allowed in standard C. When #include "..." does not
pick up a file in the locations for user headers, it is replaced by the
compiler as if it read #include <...>.
Army1987 said:Harald van D?k said:#include "stdio.h" is allowed in standard C. When #include "..." does not
pick up a file in the locations for user headers, it is replaced by the
compiler as if it read #include <...>.
I don't think Peter referred to that. Umesh asked a question which
can be misunderstood very easily, then, after being told how to
print a newline or a null character[1], he answered his question
himself, showing that what he was trying to do was printing a
backslash followed by a lowercase n, or an apostrophe followed by
a backslash followed by the digit 0 followed by another apostrophe,
a question which could be asked much less ambiguously as "how can I
print a backslash?".
Or he simplily arbitrarily snipped from that point onwards, considering heHarald van D?k said:Army1987 said:Harald van D?k said:Peter 'Shaggy' Haywood wrote:
Groovy hepcat Umesh was jivin' on 26 May 2007 09:25:29 -0700 in
comp.lang.c.
Re: How to print "\n" or '\0''s a cool scene! Dig it!
//how to print "\n" or '\0'
#include"stdio.h"
Now, I know you know better than that, Umesh. You must be trolling,
I think. The only explanation I can think of for your baffling
behaviour is that you are a troll.
That said, the only reason I'm responding to a troll is to encourage
others to ignore Umesh, and all trolls. Killfile the fool.
#include "stdio.h" is allowed in standard C. When #include "..." does
not
pick up a file in the locations for user headers, it is replaced by the
compiler as if it read #include <...>.
I don't think Peter referred to that. Umesh asked a question which
can be misunderstood very easily, then, after being told how to
print a newline or a null character[1], he answered his question
himself, showing that what he was trying to do was printing a
backslash followed by a lowercase n, or an apostrophe followed by
a backslash followed by the digit 0 followed by another apostrophe,
a question which could be asked much less ambiguously as "how can I
print a backslash?".
What you are saying would also make sense, but I think he referred to the
#include style, because he snipped every other part of Umesh's code in his
reply.
#include "stdio.h" is allowed in standard C. When #include "..." does not
pick up a file in the locations for user headers, it is replaced by the
compiler as if it read #include <...>.
Peter said:Groovy hepcat Harald van =?UTF-8?B?RMSzaw==?= was jivin' on Tue, 29
May 2007 18:43:15 +0200 in comp.lang.c.
Re: How to print "\n" or '\0''s a cool scene! Dig it!
It's allowed (by the compiler). But that doesn't make it right.
What
you say is true. However, if the compiler does find a header named
stdio.h before looking in the place it looks for <stdio.h>, then the
consequences depend on what's in that header.
In any case, the correct way to include the standard (or
implementation provided) stdio.h header is like so:
#include <stdio.h>
Anything else is the wrong way.
Harald van Dijk said:Peter said:Groovy hepcat Harald van =?UTF-8?B?RMSzaw==?= was jivin' on Tue, 29
May 2007 18:43:15 +0200 in comp.lang.c. [...]#include "stdio.h" is allowed in standard C. When #include "..." does not
pick up a file in the locations for user headers, it is replaced by the
compiler as if it read #include <...>.
It's allowed (by the compiler). But that doesn't make it right.
It's allowed by the standard, and that does make it right.
Of course. And if the umesh did place a file named stdio.h in one of the
paths the compiler looks at only for #include "..." directives, presumably
he wanted it to be used, and then #include "stdio.h" is the only way to do
it.
What's correct depends on what the C standard and the implementation's
documentation say is correct.
Keith said:Harald van Dijk said:Peter said:Groovy hepcat Harald van =?UTF-8?B?RMSzaw==?= was jivin' on Tue, 29
May 2007 18:43:15 +0200 in comp.lang.c. [...]
#include "stdio.h" is allowed in standard C. When #include "..." does
#not
pick up a file in the locations for user headers, it is replaced by the
compiler as if it read #include <...>.
It's allowed (by the compiler). But that doesn't make it right.
It's allowed by the standard, and that does make it right.
No, it makes it legal; it may or may not be "right" in a particular
context.
If Umesh placed a file named stdio.h in some directory, it's probably
a mistake. This is a judgement based on the level of expertise Umesh
has displayed so far in this newsgroup.
And on the requirements in any particular case, unless you have a very
narrow definition of "correct". For example, the following program is
perfectly legal (in fact, I believe it's strictly conforming), but
it's not "correct".
#include <stdio.h>
#define SIX 1+5
#define NINE 8+1
int main(void)
{
printf("%d * %d = %d\n", SIX, NINE, SIX * NINE);
return 0;
}
Harald said:Here's what I meant by correct:
If this is intended to print "6 * 9 = 54",
the standard doesn't say that it
does (in fact, it says that it doesn't),
so it is then not correct.
If this is intended to print "6 * 9 = 42",
the standard says that it does, so it is then correct.
I think this is not very different from what you mean,
but please tell me if
I'm misunderstanding what you consider correct.
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.