buggy_code.ex.c
来自「OPNET odb_lab_ref-baseline」· C语言 代码 · 共 21 行
C
21 行
#include <string.h>
void
fcn (void)
{
/* Note the syntax here is correct, but this program will */
/* have undefined behavior at runtime when the call to */
/* strcpy() below overwrites random memory. */
/* However, reading the contents of the compiler warnings could */
/* help you identify such an unfortunate error in your own */
/* models. Compiler warnings are kept in the */
/* <home>/op_admin/tmp/cc_err file. This file is re-created */
/* every time a model is compiled. */
char * char_ptr;
strcpy (char_ptr, "Hello World");
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?