Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Using ternary and summing array
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Ben Bacarisse, post: 4393207"] It is. It's got static storage duration and hence will be zero initialised. It should not be "out there" and, if it were defined where it should be, (in main) you'd be right. [i] I know what you mean -- it's not a good idea -- but it's perfectly valid C. It is. Both 'i' and 'a' are initialised in the op's code. That 'a' is both defined and initialised is an odd quirk of C and that quirk should definitely not be used by anyone. <snip>[/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Using ternary and summing array
Top