Possible Duplicate:
How can I access a shadowed global variable in C?
How to access a global pointer within a function, containing another pointer with the same name and type.
Ex:
#include <stdio.h>
char *ptr = "Hello World";
int main(void)
{
//char ptr = 'a';
char *ptr = "Global is over written";
printf("%s", ptr); //Here i am trying to print the value of global ptr i.e, "Hello World".
return 0;
}