#include <stdio.h>
main(void)
{
unsigned char data[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x07,0x09,\
0x00,0x20,0x10,0x03,0x03,0x0C,0x00,0x00,0x44,0x00,\
0x00,0x33,0x00,0x47,0x0C,0x0E,0x00,0x0D,0x00,0x11,\
0x00,0x00,0x00,0x02,0x64,0x00,0x00,0x00,0xAA,0x00,\
0x00,0x00,0x64,0x10,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x02,0x00,0x74,0x0F,0x41,0x00,0x00,0x00,\
0x01,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0A,0x00,\
0x00,0x02,0x74,0x0F,0x41,0x00,0x06,0x08,0x00,0x00,\
0x00,0x00,0x00,0x64,0x00,0x0F,0x00,0x00,0x0D,0x00,\
0x00,0x00,0x23,0x00,0x00,0x64,0x00,0x00,0x64,0x00 } ;
unsigned char * p1 ;
unsigned short * p2 ;
unsigned int * p4 ;
unsigned long long * p8 ;
int d , k ;
for(k = 0 , p1 = & data[k] ; k < 100 ; k ++ , p1 ++) if(* p1 == 100) {
printf(" Byte : [%d] = 100\n" , k) ;
}
for(d = 0 ; d < 2 ; d ++) {
for(k = d , p2 = (unsigned short *) & data[k] ; k + 1 < 100 ; k += 2 , p2 ++) {
if(* p2 == 100) printf(" Word : [%d] = 100\n" , k) ;
}
}
for(d = 0 ; d < 4 ; d ++) {
for(k = d , p4 = (unsigned int *) & data[k] ; k + 3 < 100 ; k += 4 , p4 ++) {
if(* p4 == 100) printf("DWord : [%d] = 100\n" , k) ;
}
}
for(d = 0 ; d < 8 ; d ++) {
for(k = d , p8 = (unsigned long long *) & data[k] ; k + 7 < 100 ; k += 8 , p8 ++) {
if(* p8 == 100) printf("QWord : [%d] = 100\n" , k) ;
}
}
}
怎么突然有股屈辱感,竟然有在伺候甲方