Some basic questions about variable initialization:
a. Is it legal to initialize the variables i, b and l like this (see below) ?
b. If so: At what time are they initialized? In other words: how can I
imagine where the compiler puts the code to initialize the variables? Is it done somehow this way that the compiler puts the values of the variables once into memory right as it does with the commands?
c. Are boolean variables exceptions that are guaranteed to default to
false even when not initialized?
int i = 99;
bool b = true;
void f(){
static long l = 9999;
}
int main(){
f();
}
Felix