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
Continue with Google
or use

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
Continue with Google
or use

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

Sorry, you do not have permission to ask a question, You must login to ask a question.

Continue with Google
or use

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

Answerclub

Answerclub Logo Answerclub Logo

Answerclub Navigation

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

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Contact Us

Welcome to Answerclub.org

Questions | Answers | Discussions | Knowledge sharing | Communities & more.

Get App on Playstore
Home/ Questions/Q 11574
Next
In Process

Answerclub Latest Questions

Darla Sandy
  • 0
  • 0
Darla SandyKnowledge Contributor
Asked: April 2, 20242024-04-02T16:31:14+05:30 2024-04-02T16:31:14+05:30In: Education

What is a pointer? give examples

  • 0
  • 0
What is a pointer? give examples
question
2
  • 2 2 Answers
  • 44 Views
  • 0 Followers
  • 0
Answer
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. aarushi mehta
    aarushi mehta Knowledge Contributor
    2024-04-02T16:55:49+05:30Added an answer on April 2, 2024 at 4:55 pm

    A variable that holds the address of another variable is called a pointer. A pointer stores the address of a variable, as opposed to other variables that store values of a certain kind.
    For instance, an integer pointer carries the address of an integer variable, but an integer variable retains—or more accurately, stores—an integer value.

      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. manali
    manali Knowledge Contributor
    2024-07-04T09:46:29+05:30Added an answer on July 4, 2024 at 9:46 am

    A pointer is a variable in programming that stores the memory address of another variable. In simpler terms, it “points to” the location of another variable in memory rather than storing a value directly. Pointers are fundamental in languages like C, C++, and other low-level languages where direct memory manipulation and efficiency are important.

    Here’s an example in C:

    #include

    int main() {
    int num = 10; // declaring an integer variable
    int *ptr; // declaring a pointer variable

    ptr = # // assigning the address of num to ptr

    printf(“Address of num: %p\n”, &num); // printing the address of num
    printf(“Value of ptr: %p\n”, ptr); // printing the value of ptr (which is the address of num)
    printf(“Value at ptr: %d\n”, *ptr); // printing the value at the address stored in ptr

    return 0;
    }

    Explanation of the example:

    int num = 10;: Defines an integer variable num with a value of 10.
    int *ptr;: Declares a pointer ptr to an integer (int * denotes a pointer to an integer).
    ptr = #: Assigns the address of num to ptr using the address-of operator (&).
    printf(“Address of num: %p\n”, &num);: Prints the address of num using %p format specifier.
    printf(“Value of ptr: %p\n”, ptr);: Prints the value stored in ptr, which is the address of num.
    printf(“Value at ptr: %d\n”, *ptr);: Prints the value at the address stored in ptr using the dereference operator (*ptr), which accesses the value at the memory address ptr points to (num in this case).

    In this example, ptr is a pointer that “points to” the variable num, allowing us to indirectly access and manipulate num through ptr. Pointers are powerful tools for efficient memory management and data manipulation in programming languages that support them.

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

You must login to add an answer.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question

Stats

  • Questions 56,306
  • Answers 50,914
  • Popular
  • Answers
  • Mr.Doge

    What are the best AI tools available for Creative Designing?

    • 47 Answers
  • Mr.Doge

    How is tax calculated in India for investing in US ...

    • 41 Answers
  • Mr.Doge

    How to invest in NCD/ Corporate Bonds in India? Is ...

    • 35 Answers
  • Eb2b Mart
    Eb2b Mart added an answer Vaccines work by training our immune system to recognize and… September 13, 2025 at 5:36 pm
  • Kundan Pandit
    Kundan Pandit added an answer When choosing a supplier, look for product quality, pricing transparency,… September 13, 2025 at 5:16 pm
  • Sumit Seo
    Sumit Seo added an answer A screen printing squeegee is one of the most essential… September 13, 2025 at 5:15 pm

Related Questions

  • What are the main uses of hydrophilic non-woven fabric, and ...

    • 1 Answer
  • What factors should be considered when selecting the most suitable ...

    • 1 Answer
  • What are the key benefits of using a pond liner ...

    • 1 Answer
  • Which schools in Gorakhpur offer international-level education standards?

    • 0 Answers
  • Which schools in Gorakhpur offer international-level education standards?

    • 0 Answers

Trending Tags

ai biology branch of study business cricket education english food general knowledge. general science geography gk health history poll question science sports technology travel

Explore

  • Home
  • Groups
  • Add group
  • Catagories
  • Questions
    • New Questions
    • Most Answered
  • Polls
  • Tags
  • Badges

© 2024 Answerclub.org | All Rights Reserved
Designed & Developed by INFINITEBOX & TechTrends