//-------------------------1------
int a = 1;
void f(int b)
{
int c = 2;
c++;
static int d = 1;
d++;
a += b + c + d;
} int e = 3;
void main()
{ int p[] = {a,e,a+e};
char* q = "abcdef";
char w[10] = "123xyz";
strcpy(w+2,q+1);
p[0] = a;
f(4);
p[1] = a*2;
strcpy(w,"hello");
f(5);
p[2] = a * 3;
}
//--------------2-------------------
void main()
{
char* p = (char*)malloc(10);
*(p+1) = "abcdef"[2];
strcpy(p,"xyz");
int x = 1;
int y = 2;
strcpy(p+3,"QWERTY"+x+y);
char* q = p;
char z[] = {p[0],p[1],p[4]};
free(q);
p = z;
q = p + 4;
*q = 'W';
}
//--------------3-------------------
void main(){
char* arr[3]={"123","abcdef","hh"};
char* p = arr[0];
cout<< p << *p;
char* q = p
C 画画内存图
最新推荐文章于 2023-11-29 09:12:05 发布