#include <iostream>
using namespace std;
void callMe(int j) {
static int i;
++i;
++j;
printf("Loop: %d\n", i);
printf("i memory location: %p\n", &i);
printf("j memory location: %p\n", &j);
printf("\n");
if ( i < 10 )
callMe(j);
printf("Returning from loop %d\n", j);
}
int main() {
callMe(0);
printf("Next\n");
callMe(0);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKCnZvaWQgY2FsbE1lKGludCBqKSB7CgogICAgICAgIHN0YXRpYyBpbnQgaTsKCiAgICAgICAgKytpOwogICAgICAgICsrajsKCXByaW50ZigiTG9vcDogJWRcbiIsIGkpOwoKCXByaW50ZigiaSBtZW1vcnkgbG9jYXRpb246ICVwXG4iLCAmaSk7CglwcmludGYoImogbWVtb3J5IGxvY2F0aW9uOiAlcFxuIiwgJmopOwoJCiAgICAgICAgcHJpbnRmKCJcbiIpOwoKCWlmICggaSA8IDEwICkKCQljYWxsTWUoaik7CgogICAgICAgIHByaW50ZigiUmV0dXJuaW5nIGZyb20gbG9vcCAlZFxuIiwgaik7ICAgICAgICAKfQoKaW50IG1haW4oKSB7CgoJY2FsbE1lKDApOwogICAgICAgIHByaW50ZigiTmV4dFxuIik7CiAJY2FsbE1lKDApOwoKCXJldHVybiAwOwoKfQ==