69,382
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
void main()
{
//char c='abcde';
/*error C2015: too many characters in constant*/
//char c='abcd';
/*
warning C4305: 'initializing' : truncation from 'const int' to 'char'
warning C4305: 'initializing' : truncation from 'const int' to 'char'
输出d
*/
char c='abc';
/*
警告同上 输出c
*/
printf("%c\n",c);
}
[Warning] D:\My Documents\C-Free\Temp\未命名1.cpp:4:9: warning: character constant too long for its type
#include<stdio.h>
int main()
{
char a='abcde';
return 0;
}