hi everybody,
today i was reading a tutorial on C++ on <http://www.cplusplus.com/doc/tutorial/pointers/> and there it is wriitten in pointer and array Initialization section:"It is important to indicate that terry contains the value 1702, and not 'h' nor "hello", although 1702 indeed is the address of both of these."
Now i write a very simple program and compile it with gcc:
and its output is : "hello"Code:#include<iostream> using namespace std; int main(){ char * terry = "hello"; cout << terry << endl; }
If terry does not contain "hello", the output should have been some address.
Pls help me to understand the concept.
Regards,
arpanm



LinkBack URL
About LinkBacks


