Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 920901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:47:30+00:00 2026-05-15T18:47:30+00:00

i am using c++ and i have some trouble about pointers i know that

  • 0

i am using c++ and i have some trouble about pointers
i know that if we declare some variable

int t=7;
int *p=&t;

*p gives adress of variable t but in c++ here also definition of **s why it is used ?i have read it but i have some misunderstanding please can anybody give me example how use?let take about given example

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:47:31+00:00Added an answer on May 15, 2026 at 6:47 pm

    First of all *p will give you the value of variable t and not the address of t. Only ‘p’ will give you the address of t.

    Essentially every address is just an integer number. If you are compiling for 32-bit architecture then it will be 32-bit long number and if you are compiling for 64-bit then it will be 64-bit long. This means that you can use a simple integer variable to store any variable’s address irrespective of what type the variable is but it is better to use a proper type of pointer to store the variable’s address. This way we can dereference the pointer and we dont have have to type cast it whenever we want to use the variable which is being pointed to.

    To create a pointer to some variable, we declare a variable of the same type but put a ‘*’ in front of the variable’s name. For example you can declare an integer as follows

    int a;

    To create a pointer to ‘a’, create a new variable with the same type as a and just put a ‘*’ in front of it. So the declaration of pointer to the above variable ‘a’ will look like

    int *p;

    Notice that other than an additional ‘*’, its the same declaration. Now ‘p’ is a pointer to an integer variable.

    Now consider that you want another pointer to point to this variable ‘p’. Again you declare a variable similar to ‘p’ and just put a ‘*’ in front of it. So a declaration of pointer to the above variable will look some thing like

    int **pp;

    Again notice that other than an extra ‘*’ this declaration is very same to the declaration of ‘p’. So the variable ‘pp’ is a pointer to a pointer to an integer

    You can declare a pointer to ‘pp’ in the same way and the cycle will continue. This is also true for non simple types i.e pointers to variables of class or structure types are created the same way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer PreparedStatement allows (numbered) parameters: PreparedStatement pstmt = connection.prepareStatement( "select MyTable.COLOR… May 16, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer Google around for an "Organization Chart" control. That will most… May 16, 2026 at 6:36 pm
  • Editorial Team
    Editorial Team added an answer You need to wrap your calls in a document.ready call,… May 16, 2026 at 6:36 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm having some trouble with a program using pthreads, where occassional crashes occur, that
I'm trying to do some parameter estimation and want to choose parameter estimates that
I am importing massive amounts of data from Excel that have various table layouts.
I am using this library to hold information about tree structure: http://www.datasoftsolutions.net/tree_container_library/overview.php Here is
I might not be using IBOutlet correctly, or some other subtlety with how NIB
I made some GUI desktop applications on my first years of development, but my
Update: This only seems to be a problem at some computers. The normal, intuitive
I am using a embeddable Flash based MP3 player (The standalone Version of Wordpress
once again I've got a question. Since I am using Google Web Toolkit (GWT)
I'm having trouble working out a query. I've tried subqueries, different joins and group_concat()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.