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.
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.
Replies
-
desijaysint 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. -
desijaysdear 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
Hold on, Desijays π !desijaysdear 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... π
Mayank seems to be totally busy these days. I'll ask him to reply asap.
-The Big K- -
MayankHi 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 are reading an archived discussion.
Related Posts
Note: Links may not work! Our forum was reworked in the month of November & therefore the links pointing to specific sections may not work.
---------------------------------
Hello CEans!
Its a...
Hello CEans!
As promised last month, we are back! Since no one really likes to read lengthy emails, we have cut-short our newsletter and made it even better.
=Quick Update=...
Hello CEans! π
First of all, HaPpy CrazyEngineers Day to you! πI hope you have a day full of ideas & activities.
As planned, the CrazyEngineers forum has been restructured....
We are an educated tribe π !
We (yes, you are included in 'we') believe in Common Sense! We believe that Common Sense can do wonders and everyone posseses good...
CEans,
Would you enjoy reading unformatted text? Would you like to read text which has long trails of dots in it? Would you like to read text in very big/very...