摘要: 首先看一下题目,下列程序会在那一行崩溃,程序如下:#includeusing namespace std;struct S{ int i; int *p;};int main(){ S s; int *p = &s.i; p[0] = 4; p[1] = 3; s.p = p; s.p[1] = 1... 阅读全文
posted @ 2015-07-09 00:17 鹅鹅鹅饿饿 阅读(749) 评论(0) 推荐(0) 编辑
摘要: 在一次做题中遇到了switch的问题,由于对switch执行顺序的不了解,在这里简单的通过字节码的方式理解一下switch执行顺序(题目如下):public class Ag{ static public int i=10; public static void main(String ... 阅读全文
posted @ 2015-06-30 09:14 鹅鹅鹅饿饿 阅读(813) 评论(0) 推荐(0) 编辑