I need help to understand program
a : 5Code:#include<stdio.h> void function (void); int main (void) { int a = 5; printf ( "\n a : %d", a); function(); return 0; } void function (void) { int b = 15; b++; printf ("\n b : %d", b); }
b : 16
There are two variables a and b
I do not understand what happen during the execution of code
How long variable a will exit ?
When we call function how long variable b will exit ?
Where does it will store stack or heap ?
any help would be appreciated