y)printf("%d",x);else printf("%d",y);}" /> y)printf("%d",x);else printf("%d",y);} - 作业答案大全" />

warning C4700: local variable 'x' used without having been initialized 求高手解释#include"stdio.h"void main(){int x,y;if (x>y)printf("%d",x);else printf("%d",y);}

问题描述:

warning C4700: local variable 'x' used without having been initialized 求高手解释
#include"stdio.h"
void main()
{
int x,y;
if (x>y)
printf("%d",x);
else
printf("%d",y);
}

这只是一个警告,但还是可以运行的.意思是你的x和y没有初始值.#include"stdio.h"void main(){\x09int x,y;\x09x=0;\x09y=0;\x09if (x>y)\x09printf("%d",x);\x09else \x09printf("%d",y);}这样就没有警告了,当然运行...