Say, you wanted to know how many times a program has been executed. Is it possible to have a variable, then when the program has been accessed increment the variable by 1 etc. and then store it back as that original variable so that the next time it is executed, it can be incremented again.
E.g. (This is not correct or real code)
/*variable to be stored*/
int num;
/*initial value*/
num = 0;
.
/*some stuff I'll do*/
/*so that num becomes incremented*/
/*please don't rage that I have done it this way*/
num = num + 1;
...and then somehow store it back into int num
.
Please help me, suggestions welcome.