Re: Why this works???



"Tomás Ó hÉilidhe" wrote:

gazelle@xxxxxxxxxxxxxxxxxxxxx (Kenny McCormack) wrote in news:fm8ufo$hfj$1
@news.xmission.com:

#include <stdio.h>
int main(void) { printf("hello, world\n"); }

I compile it with all warning turned on and it still works fine.

Forgetting for the moment that you're a troll -- a troll who's actually
not half-bad at C programming, albeit, it's a shame you don't contribute
your expertise -- we both already know why the C standard permits that
program to do whatever it likes.

I took it as an attempt at humor. Certainly we've all seen posts
like that before, along with the "English isn't my primary language"
type grammar? Rather than some "obscure" feature of C, why not ask
the same question with the quintessential C program?

[...]

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap@xxxxxxxxx>


.



Relevant Pages

  • Re: segmentation fault in recursion
    ... int main ... Because you're a troll. ... It's an infinite recursive loop, ... will attempt to consume infinite resources unless the compiler manages ...
    (comp.lang.c)
  • Re: [EGN] Numerical Accuracy
    ... >> in the loop and may not even compile. ... A FORMAL language is one with definite rules but unlike a PROGRAMMING ... formality and understand meaning. ... Therefore in future, troll, refer to substantive errors and be so good ...
    (comp.programming)
  • Re: size_t problems
    ... strlen's result to an int is clearly wrong; strlen yields size_t, ... but that does not make him a troll. ... Now, I sometimes disagree with Jacob, but I think he makes an honest ...
    (comp.lang.c)
  • Re: segmentation fault in recursion
    ... int main{ ... Because you're a troll. ... program will attempt to consume infinite resources unless the ... However a smart enough compiler could optimize it to: ...
    (comp.lang.c)
  • Re: segmentation fault in recursion
    ... int main ... Because you're a troll. ... As far as C is concerned, that is perfectly valid code. ... It's an infinite recursive loop, ...
    (comp.lang.c)

Loading