提供一套初始值结构,可加入本宣言initialisers声明.由于1月份开始,在三零但阵列启动,额外元素位置称为零杂物被用于下列例子

Files Recovery Software
聯絡細節 客戶支持 下載演示 產品  

 
 

结构初始化在C

提供一套初始值结构,可加入本宣言initialisers声明.由于1月份开始,在三零但阵列启动,额外元素位置称为零杂物被用于下列例子.

#include <stdio.h>
#include <string.h>

struct month
{
char *name;
char *abbreviation;
int days;
} month_details[] =
{
"Junk", "Junk", 0,
"January", "Jan", 31,
"February", "Feb", 28,
"March", "Mar", 31,
"April", "Apr", 30,
"May", "May", 31,
"June", "Jun", 30,
"July", "Jul", 31,
"August", "Aug", 31,
"September", "Sep", 30,
"October", "Oct", 31,
"November", "Nov", 30,
"December", "Dec", 31
};

int main()
{
int counter;
for (counter=1; counter<=12; counter++)

printf("%s is abbreviated as %s and has %d days\n",
month_details[counter].name,
month_details[counter].abbreviation,
month_details[counter].days);

return 0;
}

展出的产量如下:

January is abbreviated as Jan and has 31 days
February is abbreviated as Feb and has 28 days
March is abbreviated as Mar and has 31 days
April is abbreviated as Apr and has 30 days
May is abbreviated as May and has 31 days
June is abbreviated as Jun and has 30 days
July is abbreviated as Jul and has 31 days
August is abbreviated as Aug and has 31 days
September is abbreviated as Sep and has 30 days
October is abbreviated as Oct and has 31 days
November is abbreviated as Nov and has 30 days
December is abbreviated as Dec and has 31 days


Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |17|18| 19| 20 |

 
 

page 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |30 | 31 | 32 | 33 | 34 | 35 | 36 | 37

 
 

page 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54

 
 

page 55 | 56 | 57 | 58 | 59 | 60

Next page
 
 
數據恢復預訂
 
第1章 数据恢复概述
第2章 引进硬盘
第3章 逻辑方法和磁盘操作系统
第4章 数制
第5章 采用丙方案
第6章 电脑基本概论
第7章 民政指令所需
第8章 磁盘与BIOS的功能和中断处理三
第9章 理大硬盘
第10章 从数据恢复软败坏
第11章 制作备份
第12章 阅读和修改与编程器
第13章 阅读和修改与编程布拉格反射
第14章 编程"原始档案"复苏
第15章 数据编程刮水器
第16章 对水电开发更多磁盘
附錄 词汇数据恢复职权
 
 
Pro Data Doctor

產品

聯絡細節

客戶支持

下載演示

條款和條件

 
Pro Data Doctor