早教吧 育儿知识 作业答案 考试题库 百科 知识分享

有人帮我解释第一句程序的的意思吗?intuserlenth=sizeof(MJUserTable)/sizeof(MJUserTable[0]);//就这句帮我解释一下,下面是定义RntrenceGuard\x09MJUserTable[20]={{"0001","222222",Login},{"0002","222222",Login},{"0003"

题目详情
有人帮我解释第一句程序的的意思吗?
int user_lenth = sizeof(MJ_UserTable)/sizeof(MJ_UserTable[0]);//就这句帮我解释一下,下面是定义
Rntrence_Guard \x09MJ_UserTable[20] = {
{"0001","222222",Login},
{"0002","222222",Login},
{"0003","222222",Login},
{"0004","222222",Login},
{"0005","222222",Login},
{"0006","222222",Login},
{"0007","222222",Login},
{"0008","222222",Login},
{"0009","222222",Login},
};
typedef struct
{
\x09unsigned char MJ_User[5];\x09//用户账号
\x09unsigned char MJ_Password[7];//用户密码
\x09unsigned char Root_State;\x09 //用户状态
}Rntrence_Guard;
▼优质解答
答案和解析
sizeof(MJ_UserTable)用户表的总长
sizeof(MJ_UserTable[0])用户表一个成员的总长
所以int user_lenth = sizeof(MJ_UserTable)/sizeof(MJ_UserTable[0])计算了用户表的成员总数
看了 有人帮我解释第一句程序的的意...的网友还看了以下: