I have always been confused about the working of char* pointer.
It seems to behave quite strangely.
Unlike the int or float pointer, the char* pointer seems to be able to store an address and also a string?
1.can some one explain this dual behavior of char*?
2.why p="Hello" works? its a pointer shouldn't it give an error because "hello" is not an address, its a string?Code:
int main( )
//Does not work
3. And why cin>>p doesn't work?