1. Home >
  2. Apps >
  3. Groups >

Mayank's C/C++ Challenger III

Question asked by Mayank in #Coffee Room on Nov 23, 2006
Mayank
Mayank 路 Nov 23, 2006
Rank D2 - MASTER
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. Posted in: #Coffee Room
desijays
desijays 路 Nov 23, 2006
Rank C3 - EXPERT
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 路 Nov 27, 2006
Rank C3 - EXPERT
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... 馃榾
Kaustubh Katdare
Kaustubh Katdare 路 Nov 27, 2006
Rank A1 - PRO
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 路 Nov 29, 2006
Rank D2 - MASTER
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.馃榿

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up