I can't figure out why a gives a value of 0, Can anyone explain? Thanks in advance.
The output for this program is 770
include<stdio.h>
include<stdlib.h>
int a,b;
void mystery(){
while(b>0){
int a;
a=a+10;
b=b-1;
}
}
int main(){
a=7; b=a;
printf("%d\n",a);
mystery();
printf("%d\n",a);
printf("%d\n",b);
system("pause")
return 0;
}