mirror of
https://github.com/ioacademy-jikim/device_driver
synced 2025-06-07 07:56:08 +00:00
35 lines
361 B
C
35 lines
361 B
C
#if 1
|
|
#include <stdio.h>
|
|
struct aaa
|
|
{
|
|
int count;
|
|
int flag;
|
|
int data[];
|
|
};
|
|
|
|
int main()
|
|
{
|
|
struct aaa *p;
|
|
p = malloc( sizeof(struct aaa) + sizeof(int)*100 );
|
|
p->count = 0;
|
|
p->data[0] = 10;
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#if 0
|
|
#include <stdio.h>
|
|
struct aaa
|
|
{
|
|
int a;
|
|
int b[];
|
|
};
|
|
|
|
int main()
|
|
{
|
|
struct aaa a;
|
|
printf("sizeof(a)=%lu\n", sizeof a );
|
|
return 0;
|
|
}
|
|
#endif
|