Solved

dynamic integer pointers

Posted on 2000-04-27
2
203 Views
Last Modified: 2010-04-02
tried to solve but having problems with this. P and Q are declared as dynamic integer points, what is printed by the following statements:
int *P=new int; int*Q= new int; Q=P; *Q=4; cout<<*P; cout<<*Q; int*Q= new int; *Q=5; cout<<*P; cout<<*Q;
0
Comment
Question by:beachbumm
2 Comments
 
LVL 3

Accepted Solution

by:
3rsrichard earned 10 total points
ID: 2755260
4
4
4
5
0
 

Author Comment

by:beachbumm
ID: 2755305
THANKS!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now