指针数组和数组指针的使用
来源:互联网 发布:惊天战神 游戏源码 编辑:程序博客网 时间:2024/05/21 19:34
#include<stdio.h>
int main()
{
char *str[] = {"Welcome","to","Fortemedia","Nanjing"};
char **p = str +1;
str[0] = (*p++) +2;
str[1] = *(p+1);
str[2] = p[1] + 3;
str[3] = p[0] + (str[2] - str[1]);
printf("%s\n",str[0]);
printf("%s\n",str[1]);
printf("%s\n",str[2]);
printf("%s\n",str[3]);
return 0;
int main()
{
char *str[] = {"Welcome","to","Fortemedia","Nanjing"};
char **p = str +1;
str[0] = (*p++) +2;
str[1] = *(p+1);
str[2] = p[1] + 3;
str[3] = p[0] + (str[2] - str[1]);
printf("%s\n",str[0]);
printf("%s\n",str[1]);
printf("%s\n",str[2]);
printf("%s\n",str[3]);
return 0;
}
1.(空)
2. Nanjing
3. jing
4.g
0 0
- 指针数组和数组指针的使用
- 指针数组和数组指针的使用
- 数组指针和指针数组的使用
- 指针数组和数组指针的使用
- 指针数组和数组指针的使用
- 指针数组和数组指针的使用
- 数组和指针的使用
- 数组指针、 指针数组、函数指针、函数指针数组和指向函数指针数组的指针
- 简述指针数组 数组指针 函数指针 函数指针数组和函数指针数组的指针
- 数组指针、指针数组、指向指针的指针使用总结
- 数组指针和指针数组以及指针的指针
- 指针数组与数组指针的使用
- 指针数组和数组指针的区别
- 指向数组的指针和指针数组
- 指针数组和指向指针的数组
- 指针数组和数组指针的技巧
- 指针数组和指向数组的指针
- 指针数组和数组指针的区别
- (一)C语言基础(基本数据类型,输入输出)
- 23种设计模式
- Android 从0开始自定义控件之 View 基础知识与概念(一)
- pokemon shuffle c sorce
- Android实践:Https不再疑惑
- 指针数组和数组指针的使用
- 选择排序
- Arduino单片机I2C库
- silverlight连接SQL Server数据库
- 将GPS坐标转换为火星坐标
- WebService soap报文请求与响应报文解析
- ZeroMQ中的消息信封之二
- hibernate 二级缓存
- 云笔记