已知結(jié)構(gòu)體為 struct{ unsinged short s; int i; char()p; }Data; 在32位編譯器,以4字節(jié)對(duì)齊的情況下,sizeof(Data)等于()。
A.12 B.10 C.7 D.3
假設(shè)傳入 0xEF, 返回結(jié)果是()。 int func(x) { int countx=0; while(x){ countx++; x=x&(x-1); } return countx; }
A.0xEF B.7 C.1 D.15
以下java程序代碼,執(zhí)行后的結(jié)果是()。 java.util.HashMap map=new java.util.HashMap(); map.put(“name”,null); map.put(“name”,”Jack”); System.out.println(map.size());
A.0 B.null C.1 D.2