11.1 字符串和指针
来源:互联网 发布:高要网络问政平台 编辑:程序博客网 时间:2024/06/07 15:59
关于指针输出字符串
const char *p = "something is pointing at me.";puts(p);
将字符串看作指针
#include<stdio.h>int main(){ printf("%s %p %c\n","we","are",*"space farers");}//输出we 0x100000f61 s
使用指针表示法创建字符串
const char *p = "something is pointing at me .";//下面的声明和上面几乎相同const char ar1[] = "something is pointing at me .";
数组和指针的区别、数组名heart 是常量,指针名head 是变量(壳进行递增操作)
char heart [] ="i love you !";const char *head = "i love you !";//使其等价head=heart;
指向字符串的指针数组和char类型数组的数组
const char *myarray[LIM]={"adding number swiftly","understanding ins"};char youarray[LIM][SLEN]={"walking in a straight line","sleeping letters"};
阅读全文
0 0
- 11.1 字符串和指针
- 指针字符串和数组指针
- 字符串指针和字符串数组
- 字符串指针和字符串数组
- 字符串数组和字符串指针
- 字符串指针和字符串数组
- c++ 指针和字符串
- 谈谈指针和字符串
- 字符串和指针
- 字符串和指针
- 字符串常量和指针
- 字符串指针和数组
- 指针和字符串常量
- 指针和字符串
- 指针和字符串
- C 指针和字符串
- 指针和字符串
- 指针和字符串常量
- $ref':'$[0].coupon.merchants[0]' ,数据引用问题
- 调用pcl计算法向量,并将法向量可视化
- 10.13-3 指针与一维数组相关运算
- (1)JVM运行时数据分区
- 10.13-7 指针与二维数组copy
- 11.1 字符串和指针
- jquery 点击元素实现背景色改变,点击元素以外任意地方还原该元素背景色
- 11.2 字符串和字符串函数:fgets()函数
- 11.3 字符串输出 puts()
- CentOS 安装zlib
- 11.3 字符串和字符数组:缩短数组长度
- 11.3 字符串和字符数组:strcpy()函数
- 《深入理解java虚拟机》读书笔记二 【OutOfMemoryError】
- 我什么要写技术博客