Find the mistakes in the following code not all lines


Find the mistakes in the following code. Not all lines contain mistakes. Each line depends on the line preceding it. Watch out for unitialized pointers, NULL pointers, pointers to deleted objects, and confusing pointers with objects. #include #include using namespace std; int main (void) { int* p = new int; p = 5; *p = *p + 5; string s = "Harry"; *s = "Sally"; delete &s; int* a = new int[10]; *a = 5; a[10] = 5; delete a; int* q; *q = 5; q = p; delete q; delete p; }

Request for Solution File

Ask an Expert for Answer!!
Other Subject: Find the mistakes in the following code not all lines
Reference No:- TGS0655420

Expected delivery within 24 Hours