TEST

 
#include <stdio.h>
#include<iostream>
typedef unsigned char INT8U;
#define SIZE (5u)

int main(void)
{
	typedef struct DHCP{
	    int options[20];
		int op;
		int os;
		int oo[4];
	}P;
P* p=new P;
int n=0;
p->options[n++]=0;
p->options[n++]=53;
p->options[n++]=1;
p->options[n++]=2;


P p2;
int m=6;
p2.options[m++]=9;
p2.options[m++]=10;

P p3;
p3=*p;

P* p4=new P;
*p4=p2;
//printf ("N M = "); scanf("%d%d", &n, &m);
//for (i=2; i<=n; i++) s=(s+m)%i;
//printf ("The winner is %d\n", s+1);

//n=m;
//options[n++]=0xfffff;
//options[n++]=0x12;
//options[n++]=0x34;
//options[n++]=0x56;
//options[n++]=0x78;
//options[n++]=0x5d;
//options[2]=5;
for(int i=0;i<20;i++)
printf("%d\n",p->options[i]);
printf("options字段大小为:%d\n",n);
printf("***********p2*********\n");
for(int s=0;s<20;s++)
printf("%d\n",p2.options[s]);
printf("**********p3**********\n");
for(int o=0;o<20;o++)
printf("%d\n",p3.options[o]);
printf("************p4********\n");
for(int l=0;l<20;l++)
printf("%d\n",p4->options[l]);
//system("pause");
INT8U j;
for(j=0;j<4u;j++)
{
  printf("%d\n",j); 
}

INT8U test[SIZE];
for(j=0;j<SIZE;j++)
{
  printf("%d\n",test[j]);
}
return 1;
}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值