1、sizeof()
int main()
{
int a[20];
int count=sizeof(a)/sizeof(int);
printf(“%d\n”,count);
return 0;
}
2、指针数组
整型数组 int a[20];
int a=10;
int b=20;
指针数组 int *a[20]={&a,&b};
char c=’m’;
char d=’n’;
char b[20]=”hello”;
char *b[20]={&c,&d};
char *argv[]={“hi”,”sunhong”};
3、字符串函数
strlen 和 sizeof 的区别
include
include
include
include
include
include
include
include
include
include
include
include