C 画画内存图

//-------------------------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
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值