指针遍历字符

来源:互联网 发布:国有企业发展 知乎 编辑:程序博客网 时间:2024/05/22 01:35
#include <stdio.h>#include <stdlib.h> void main(){    char *p = "taskList";    while (*p)    {        printf("\n%c,%x", *p,p);        p++;    }    system("pause");}
原创粉丝点击