PARTICIPATION ACTIVITY
1.1.8: Common pointer errors
Indicate if each code segment has a syntax error, runtime error, or no error.
1) char* newPointer; newPointer = new char; *newPointer='A'; cout<<*newPointer;
O no errors
2) char* valPointer1,*valPointer2; valPointer1 = nullptr; valPointer2= nullptr;
O no errors
3) char someChar='z'; char* valPointer; valPointer = &someChar;
O no errors
4) char* newPointer = nullptr; char someChar='A'; *newPointer='B';
O runtime error