阅读背景:

c语言中switch语句容易引发的错误

来源:互联网 

首先来看下面一段代码

#include <stdio.h>

int main(int argc, char **argv)
{
	int i = 5;

	switch(i)
	{
	case 1: i++; break;
	case 2: i+=2; break;
	case 3: i+=3; break;
	defauit:i+=4;
	}

	printf("%d", i);
	return 0;
}

#include <stdio.h>

int main(in



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: