Display value of char *, then display value of char static_cast to void * : char pointer « Data Types « C++ Tutorial






#include <iostream>
using std::cout;
using std::endl;

int main()
{
   char *word = "again";

  
   cout << "Value of word is: " << word << endl
      << "Value of static_cast< void * >( word ) is: " 
      << static_cast< void * >( word ) << endl;
   return 0;
}
Value of word is: again
Value of static_cast< void * >( word ) is: 0x43e000








2.21.char pointer
2.21.1.Reverse string case using pointer arithmetic
2.21.2.Printing the address stored in a char * variable
2.21.3.Display value of char *, then display value of char static_cast to void *
2.21.4.Converting lowercase letters to uppercase letters using a pointer
2.21.5.Printing a string one character at a time using a pointer