Ponteiros em C

Description

Mind Map on Ponteiros em C, created by felipes1474 on 15/07/2013.
felipes1474
Mind Map by felipes1474, updated more than 1 year ago
felipes1474
Created by felipes1474 about 11 years ago
56
1

Resource summary

Ponteiros em C
  1. Declaração do ponteiro: int *p; Endereço de uma variável: p = &c;
    1. p "aponta" para c
    2. Operações
      1. *ip = *ip + 10;
        1. y = *ip + 1;
          1. ++*ip; (*ip)++;
          2. Ponteiros para Arrays
            1. int *pa; pa = &a[0];

              Annotations:

              • pa to point to element zero of a; that is, pa contains the address of a[0].
              1. pa = pa + 1;

                Annotations:

                • If pa points to a particular element of an array, then by definition pa+1 points to the next element, pa+i points i elements after pa, and pa-i points i elements before. Thus, if pa points to a[0],
              2. Códigos com mesmo significado
                1. pa = &a[0]; e pa = a;
                  1. a[i]; e *(a + i);
                    1. a[i]; e pa[i];
                      1. a+i; e &a[i];
                      2. Atenção
                        1. Permitido
                          1. pa = a; e pa++;
                          2. Não Permitido
                            1. a = pa; e a++;
                        2. Ponteiros para Structs
                          1. struct node { int value; struct node *next; }
                            1. struct node { int value; struct node *left; struct node *right; }
                            Show full summary Hide full summary

                            Similar

                            BIOLOGY B1 3
                            x_clairey_x
                            Biology AQA 3.2.5 Mitosis
                            evie.daines
                            A Level: English language and literature techniques = Lexis
                            Jessica 'JessieB
                            History - Medicine through Time
                            Alice Love
                            Coastal Landscapes
                            Chima Power
                            GCSE AQA Biology 3 Kidneys & Homeostasis
                            Lilac Potato
                            Physics 1
                            Peter Hoskins
                            Business Studies - AQA - GCSE - Types of Ownership
                            Josh Anderson
                            What are they doing?
                            Tamara Urzhumova
                            The Skeleton and Muscles
                            james liew
                            2PR101 1.test - 6. část
                            Nikola Truong