1. 程式人生 > >c語言%c與%s與%d

c語言%c與%s與%d

// %s 指向記憶體裡面的內容
// %d 指向變數裡面的值

//%s 讀入一個內容

int main(void){
    char *p = NULL;
    char buf[100] = "abc";
    p = &buf[0];
    printf("%c\n", *p); //a
    printf("%s\n", p); //abc
    
    printf("\n");
    system("pause");
    return 0;
}