plinklist.c
来自「cygwin下的包含各种c基本操作的demo程序」· C语言 代码 · 共 35 行
C
35 行
//-------------------------------------------------------
// linklist and queue ,tree operation demo
//-------------------------------------------------------
#include <plinklist.h>
extern char *tt = "a strange declearation(define),isn't it?";
link_list *new_llnode=NULL;
//extern
struct spe a_ll;
void plinklist(void)
{
volatile int aa;
unsigned char p_str[6] = {0x11,0x22,0x33,0x44,0x55,0x66};
a_ll.aa = 0xbb;
new_llnode = (link_list*)malloc(sizeof(struct ll));//NOTE: do need a struct before ll
new_llnode->data = sizeof(struct spe);
EXAM_ASSERT(a_ll.aa == 0xbb);
printf("the value of new_llnode->data is 0x%x\n",new_llnode->data);
printf("the value of a_ll.aa is 0x%x\n",a_ll.aa);
printf("the value of p_str[0] = 0x%x,p_str[1] = 0x%x\n",p_str[0],p_str[1]);
printf("the value of cover_str.aa = 0x%x \n",((struct cover_str *)p_str)->aa);
//printf("%d\n",((struct cover_str )(*(p_str)->aa))); error
printf("extern char *tt is %s \n",tt);
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?