指针
chenqi_1998
陈七,一个小白,每天坚持分享自己敲的代码,帮助更多学c语言的朋友,希望跟大家共同进步。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
02_03_指针变量,和指向的内存是两个不同的概念
#define _CRT_SECURE_NO_WARNINGS//强行去掉安全检查#include<stdio.h>#include<stdlib.h>#include<Windows.h>void main(){ char *p = NULL; char buf[] = "chenqi"; printf("p1=%d\n", p); //改变指针变量的...原创 2018-06-27 09:23:54 · 261 阅读 · 0 评论 -
02-04_通过指针间接赋值
#define _CRT_SECURE_NO_WARNINGS//强行去掉安全检查#include<stdio.h>#include<stdlib.h>#include<Windows.h>void fun(char *p){ strcpy(p, "chenqi-jiayou");}void fun2(char *p){ strcpy(p, "chenqi-ji...原创 2018-06-28 09:30:20 · 270 阅读 · 0 评论 -
02_05_指针做参数输入输出特性
#define _CRT_SECURE_NO_WARNINGS//强行去掉安全检查#include<stdio.h>#include<stdlib.h>#include<Windows.h>int get_b(){ int b = 10; return b;}int get_b2(){ int b = 20; return b;}int get_b3(int *...原创 2018-06-28 09:31:15 · 201 阅读 · 0 评论 -
02_06_不断改变指针的指向
#define _CRT_SECURE_NO_WARNINGS//强行去掉安全检查#include<stdio.h>#include<stdlib.h>#include<Windows.h>void main(){ char *p = NULL; char *q = NULL; char buf[100] = "chenqi-----777"; p = &...原创 2018-06-28 09:32:54 · 166 阅读 · 0 评论
分享