Z
Zalek Bloom
Hello,
Why a pointer of a string array does not prints any address, but a
string itself? Here is my test:
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
void main()
{
char c[] = "the string";
char * pc = &c[0] ;
cout << "string c = " << c << endl;
cout << "pointer of c = " << pc << endl ;
}
Here are results:
string c = the string
pointer of c = the string
Why pointer of c - pc - does not prints any address?
Thanks,
Zalek
Why a pointer of a string array does not prints any address, but a
string itself? Here is my test:
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
void main()
{
char c[] = "the string";
char * pc = &c[0] ;
cout << "string c = " << c << endl;
cout << "pointer of c = " << pc << endl ;
}
Here are results:
string c = the string
pointer of c = the string
Why pointer of c - pc - does not prints any address?
Thanks,
Zalek