以下代码的输出结果是?
char *p = "abc"; char *q = "abc123"; while(*p = *q) printf("%c%c", *p, *q);
#include <stdio.h> int main() { char *p="abc"; char *q="abc123"; while(*p==*q) { printf("%c%c",*p,*q); p++;q++; } return 0;程序运行出来就是A选项,但是编译的时候被提醒不建议用字符串常量赋值给字符指针。
warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]|