What is going on here. Copy this C code , compile and run. What do you think is going on? Note I don't want the answer, I know what's going on here. This is just something for the rookies to play with...
Also this is not the best way to write code...
#include <stdio.h>
#include <stdlib.h>
int* myint(void)
{
static int myint = 9;
fprintf(stdout, "myint now equals->%d\n", myint);
return &myint;
}
int main(int argc, char**argv)
{
*(myint()) = 12356;
myint();
exit(EXIT_SUCCESS);
}