View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12933 Members
Join this group to post and comment.
Mayank
Mayank • Nov 23, 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 • Nov 23, 2006
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
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
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
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 -