Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

372
Views
What are pointers in C?

In short, they are variables that contain the memory address of another variable, that is, they refer to the memory location of the other variable. This ensures us to quickly access the stored information.

For example:

 address = 0, 1, 2, 3, 4, 5 variable = a, b, c, d, e, f value = ?, ?, 4, 9, ?, 5

We see that the variable "d" is at memory address 3 and that its value is "9".

To access its value very quickly, you just have to create a pointer to that memory address.

 int d = 9; int *p = &d printf("Address of 'd': %p\n", &d); result: Addres of 'd': 3 printf("Value of 'p': %p\n", p); result: Value of 'p': 9

this would indicate that "*p" is pointing to the memory address of the variable "d" so you can access its value faster.

If we want to access a memory location (X) to change its value, it would be something like:

 struct point { int x; int y; }; struct point my_point = { 3, 7 }; struct point *p = &my_point; printf("%p", p); result: {3, 4} p->x = 5; p->y = 6; printf("%p", p); result: {5, 6}

Or you can also assign a new value like this (*p).y = 5

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!