Programação - Declaração de Ponteiros (Exemplos)
//Declarando ponteiros int *ponteiro; int valor; ponteiro=&valor; //-Declarando Ponteiros Genericos void *ponteirogenerico; int testegenerico= 24 ; ponteirogenerico=&testegenerico; printf ( "%d" ,*( int *)ponteirogenerico); //---Declarando ponteiros em Arrays int vet [ 5 ]={ 1 , 2 , 3 , 4 , 5 }; int *p=vet; //---Alocação dinâmica // Sem Size Of int *v=( int *) malloc ( 200 ); //Com Size Of int *v=( int *) malloc ( 50 * sizeof ( int )); //---Liberar memória free (v); //---Calloc // Sem Size Of int *v=( int *) calloc ( 50 , 4 ); /*Posição e tamanho de bits */ //Com Size Of int *v=( int *) callot ( 50 , sizeof ( int )); //---Realloc // Sem Size Of int *v=( int *) malloc ( 200 ); v=( int *) realloc (v, 400 ;) //Com Size Of int *v=( int *) malloc ( 50 * sizeof ( int )); v=( int *) realloc ( 100 * sizeof ( int ));