![]() |
| | #1 |
| Registered User Join Date: Nov 2009
Posts: 1
| Auto variable initialization --On most windows machines ints are not auto-initialized to 0 but on some linux machines ints are auto-initialized to 0. Is there any standard (C89 / C99?) which specifies the behavior of the following program or it is undefined? Code: int main (){
int k;
printf("%d",k);
}
|
| cnickp is offline | |
| | #2 |
| +++ OK NO CARRIER Join Date: Oct 2001
Posts: 10,260
| It is defined that they are not required to be initialized. Quzah.
__________________ Hundreds of thousands of dipshits can't be wrong. Are you up for the suck? |
| quzah is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A very long list of questions... maybe to long... | Ravens'sWrath | C Programming | 16 | 05-16-2007 05:36 AM |
| pointers | InvariantLoop | C Programming | 13 | 02-04-2005 09:32 AM |
| Problem with a char variable set as a letter | 7smurfs | C++ Programming | 6 | 12-10-2004 01:25 PM |
| Need help | awkeller | C Programming | 2 | 12-09-2001 03:02 PM |
| Variable Allocation in a simple operating system | awkeller | C Programming | 1 | 12-08-2001 02:26 PM |