学习日志 王俊

苏嵌                                                                                                                                            项目实战

 

学习日志                                          姓名:王俊             日期:7月23

 

 

 

 

今日学习任务

 

  1.       了解register,static,extern,const,typedef,它们的作用的使用方法;
  2.       学习结构体,共用体,梅举的使用和作用;

今日任务完成情况

 

(详细说明本日任务是否按计划完成,开发的代码量)

  1. 基本掌握了 register,static,extern,const,typedef,它们的作用的使用方法;
  2. 学会了怎么使用struct,union,enum;

 

今日开发中出现的问题汇总

 

今日无

 

今日未解决问题

 

今日开发收获

掌握了register,static,extern,const,typedef的使用,也掌握了 struct,union,enum;的使用;

结构体的作用时封装数据,打包数据;

 

自我评价

 

(是否按开发规范完成既定任务,需要改进的地方,与他人合作效果等)

 

 

对编程还需多加练习;

其他

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#inclaude<stdio.h>

  2

  3 struct student

  4 {

  5     char sex;

  6     char name;

  7     int num;

  8     double i;

  9 };

 10 typedef struct student sdt;

 11 int main()

 12 {

 13     sdt p;

 14     printf("sizeof(p) = %d\n",sizeof(p));

return 0;

 16 }

 

 

#include<stdio.h>

  2 #include<string.h>

  3

  4 struct student

  5 {

  6     int age;

  7     char ch;

  8     char ptr[50];

  9 };

 10 typedef struct student sdt;

 11 int main()

 12 {

 13     sdt sd;

 14     sdt * p_sd = &sd;

sd.age = 8;

 16    // p_sd->age = 9;

 17     sd.ch = 'n';

 18     //p_sd->ch = 'v';

 19     strcpy(p_sd->ptr,"hello world");

 20     printf("sd.age = %d sd.ch = %c\n",sd.age,sd.ch)    ;

 21     printf("ptr = %s\n",sd.ptr);

 22     return 0;

 23 }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值