menu-iconExamlexExamLexServices

Discover

Ask a Question
  1. All Topics
  2. Topic
    Computing
  3. Study Set
    Problem Solving with C++ Study Set 1
  4. Exam
    Exam 9: Pointers and Dynamic Arrays
  5. Question
    What Is the Output of the Following Code
Solved

What Is the Output of the Following Code

Question 7

Question 7

Multiple Choice

What is the output of the following code?
Int *p1, *p2;
P1 = new int;
P2 = new int;
*p1=11;
*p2=0;
P2=p1;
Cout << *p1 <<" " << *p2 << endl;


A) 11 0
B) 0 11
C) 11 11
D) 0 0

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Q2: Which of the following is not true?<br>A)

Q3: Which of the following statements correctly prints

Q4: Which of the following assigns to p1

Q5: Declare a pointer variable named ptr to

Q6: Dynamically created variables have no name.

Q8: Even though pointers point to addresses which

Q9: Given that p1 is a pointer variable

Q10: Assuming that the pointer variable p1 is

Q11: In which case would you consider using

Q12: If p1 is an integer pointer that

Examlex

ExamLex

About UsContact UsPerks CenterHomeschoolingTest Prep

Work With Us

Campus RepresentativeInfluencers

Links

FaqPricingChrome Extension

Download The App

Get App StoreGet Google Play

Policies

Privacy PolicyTerms of ServiceHonor CodeCommunity Guidelines

Scan To Download

qr-code

Copyright © (2025) ExamLex LLC.

Privacy PolicyTerms Of ServiceHonor CodeCommunity Guidelines