Why is the pointer not keeping its value????Code:void test(char *testptr)
{
testptr = "hello world";
// 2. GDB says tesptr has value: 0x80487cc "hello world"
}
int main()
{
char *testptr;
// 1. GDB says testptr has value: 0x8006d0 and a bunch of crap: U\211aWVSeo\224
test(testptr);
// 3. GDB says testptr again has value 0x8006d0 and a bunch of crap: U\211aWVSeo\224
}