I stuck to a problem
Statement: i define two function one returning a string and other a single char.
the code is work fine it successfully return string "martin" and a char 'a'....
but if i remove the word static from func(),like,
static char Text2="martin";
ch = 'a';
Text1 = func();
Text2 = "outside";
c = funchar();
than this function return a garbage but as in funchar() i didn't declare char ch as static still it return 'a'.
Why this is happen..?
Do array whether it is a char array or and other(int ,double) , only its location is stored in stack means actually the string "martin" stored somewhere else but its reference will stored in stack.
Or the whole string "martin" will stored in stack.?