指针的一些小练习

 1 #include <stdio.h>
 2 
 3 int main(void)
 4 {
 5 /*    
 6     //1.往指定内存存入数据:请写一条语句,往内存地址 0x12345678 中写入整型数据 1234。
 7     *((int *)0x12345678) = 1234;//可能程序会崩溃,但是编译能够通过。指针是个有类型的地址。
 8 */
 9 
10 /*
11     //2.有字符数组如下 char name[5] = {'M', 'A', 'D', 'A', 'M'},判断其是否是回文串。
12     char name[5] = {'M', 'A', 'D', 'A', 'M'};
13     char *p = name;
14     p += 4;
15     while(p>=name)
16     {
17         printf("%c	",*p--);
18     }
19 */
20     return 0;
21 }
原文地址:https://www.cnblogs.com/wangchaomahan/p/9656308.html