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.

Replies

  • desijays
    desijays
    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
    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
    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
    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 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...