I am wondering this code:
int main(){
int p;
for(int i = 0; i < 10; i++){
p = ...;
}
return 0
}
exactly coincides with the fact that
int main(){
for(int i = 0; i < 10; i++){
int p = ...;
}
return 0
}
in terms of efficiency? I mean, the variable p will be recreated 10 times in the second example?
source
share