include<stdio.h>
define values[N_VALUES];
float values[N_VALUES];
float vp;
for
int main()
{
int arr[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
printf("%d\n",&arr[9] - &arr[0]);//中间数组的个数
return 0;
}
strlen求字符串的长度'/0'之前的字符
int my_strlen(char str)
{
char* start = str;
char* end = str;
while (end != '\0')
{
end++;
}
return end - start;
}
int main()
{
char arr[] = "good";
int len = my_strlen(arr);
printf("%d\n", len);
return 0;
}
二级指针
int main()
{
int a = 10;
int pa = &a;
int** ppa = &pa;
**ppa = 10 + 10;
printf("%d\n", *ppa);
printf("%d\n", a);
}
int main()
{
int a = 5,b = 20,c = 10;
int arr[3] = { &a, &b, &c };
for (int i = 0; i<3; i++)
{
printf("%d, ", arr[i]);
}
return 0;
}
标签:10,arr,end,入门,int,char,printf,指针 From: https://www.cnblogs.com/lwl0/p/17977171