#include <iostream> #include <string> using namespace std; void main() {
//exp.3 char *charPtr; //if this printer is not initialized, when it is used, //run-time check failure#3- the variable 'charPtr' is being used without being initialized. cout << "char *charPtr without asignment" << endl; cout << "sizeof(charPtr) is : " << sizeof(charPtr) << endl; cout << "sizeof(*charPtr) is : " << sizeof(*charPtr) << endl << endl; /* char *charPtr without asignment sizeof(charPtr) is : 4 sizeof(*charPtr) is : 1 请按任意键继续. . . */
}