C++ Pointer to Char Array

C++ Pointer to Char Array examples below. char var = {'1','2','3','\0'};char *ptr; // c++ pointer to a char arrayptr = &var ; // points to the start of the arraystd::cout << "Address of var is " << &var << std::endl;std::cout << "Value of var is " << *ptr << std::endl;Last std::cout will print all the characters starting from position 0. Other users...
Read More
Top