Mayank
Mayank
Branch Unspecified
29 Nov 2006

Mayank's C/C++ Challenger III

Hi All,

Sorry for the delay in comming up with this post in the C/C++ Challenger Series. This time I again have something from the C++ corner😁.

Question:
How would you write a constant reference to a constant pointer to integer
int i = 10 ;
int *const ptr = &i ;

So the syntax of the "integer" and the "pointer" is given. Tell me the way you will write the asked reference.
Hoping for a lots of replies.;-)


Thanks and Regards,
Mayank Shukla.
desijays

desijays

Branch Unspecified
12 years ago
int i = 10; // integer
int *const ptr = &i; // constant pointer to an integer



int *const & const i; //constant reference to a constant
//pointer, that points to an integer.
desijays

desijays

Branch Unspecified
12 years ago
dear mayank, u there mate. i've posted the probable solution 3 days ago. Im still waiting for you to tell me if its right or wrong... 😀
12 years ago
desijays
dear mayank, u there mate. i've posted the probable solution 3 days ago. Im still waiting for you to tell me if its right or wrong... 😀
Hold on, Desijays 😀 !

Mayank seems to be totally busy these days. I'll ask him to reply asap.

-The Big K-
Mayank

Mayank

Branch Unspecified
12 years ago
Hi desijays,

You are absolutely correct \😁/

Sorry for the delay friend, I was really very badly occupied with other stuffs 😔.

Anyways, keeps the spirits HIGH.


Thanks and Regards,
Mayank Shukla.😁

Share this content on your social channels -

Only logged in users can reply.