摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> void swap(char** a,char** b)//输入的参数是二级指针(指针的地址) { char* temp;//对指针(内容的地址)进行改变 temp= *a;//改变 阅读全文
posted @ 2020-06-04 10:59 DemoLi 阅读(1492) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<string.h> int main() { const char *a="I love China!"; int n; scanf("%d",&n); printf("%s\n",a+n); return 0; } 阅读全文
posted @ 2020-06-04 10:49 DemoLi 阅读(543) 评论(0) 推荐(0) 编辑
摘要: `void swap(int *a,int *b,int *c){ if(*a < *b){ int temp = *a; //防止temp没有初始化 随机存放地址指向系统工作区间 可以对temp初始化 int x; int *temp = &x; *a = *b; *b = temp; } if( 阅读全文
posted @ 2020-06-04 10:38 DemoLi 阅读(537) 评论(0) 推荐(0) 编辑