Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Predict the output of the following program. You should justify your answers. #include using namespace std; int main () { } int* ptr_a;
3. Predict the output of the following program. You should justify your answers. #include using namespace std; int main () { } int* ptr_a; int* ptr_b; int **ptr_c; ptr_a new int; *ptr_a 3; ptr_b M ptr_a; cout < < *ptr_a < < " " < < *ptr_b < < < " "; M ptr_b *ptr_b cout < < < *ptr_a < < " " < < *ptr_b < < < " "; M new int; 9; *ptr_b *ptr_a; cout < < *ptr_a < < " " < < *ptr_b < < < " "; delete ptr_a; ptr_a= ptr_b; cout < < *ptr_a < < " " < < *&*&*&&*ptr_b < < " "; ptr_c &ptr_a; cout < < *ptr_c < < " " < < **ptr_c < < " "; return 0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started