随笔分类 - 其它
摘要:1 import java.io.*; 2 3 public class TEST1 { 4 public static void main(String args[]) throws IOException 5 { 6 int count = 0; 7 byte buff[] = new byte[1024]; 8 count = System.in.read(buff); 9 String strings = new String(buff, 0, count);10 String stri...
阅读全文
摘要:下面这一段代码无法正常运行: 1 #include "stdlib.h" 2 3 4 int main(int argc, char* argv[]) 5 { 6 void* result = malloc(4); 7 int* ptr = (int*) result; 8 9 10 { // 代码段A 11 for (int i = 0; i < 100; i++, ptr++)12 {13 *ptr = i; // 此处竟然可以越界访问没有...
阅读全文
浙公网安备 33010602011771号