📄 plinklist.c
字号:
//-------------------------------------------------------
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -