Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

374
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda