“Como usar o ponteiro em C para imprimir char” Respostas de código

como imprimir o valor do ponteiro em c

#include <stdio.h>
#include <stdlib.h>

void pointerFuncA(int* iptr){
/*Print the value pointed to by iptr*/
printf("Value:  %d\n", *iptr );

/*Print the address pointed to by iptr*/
printf("Value:  %p\n", iptr );

/*Print the address of iptr itself*/
printf("Value:  %p\n", &iptr );
}

int main(){
int i = 1234; //Create a variable to get the address of
int* foo = &i; //Get the address of the variable named i and pass it to the integer pointer named foo
pointerFuncA(foo); //Pass foo to the function. See I removed void here because we are not declaring a function, but calling it.

return 0;
}

c Ponteiro de impressão

#include <stdio.h>

int main()
{
char * str = "Hello";
printf("%s\n", str);

return 0;
}
Calm Centipede

Como usar o ponteiro em C para imprimir char

#include <stdio.h>

    int main(void) {
        char *p = "abc";
        printf("%c",*p);
        return 0;
    }
Glorious Gentoo

Respostas semelhantes a “Como usar o ponteiro em C para imprimir char”

Perguntas semelhantes a “Como usar o ponteiro em C para imprimir char”

Mais respostas relacionadas para “Como usar o ponteiro em C para imprimir char” em C

Procure respostas de código populares por idioma

Procurar outros idiomas de código