打印内存地址 基本数据类型 定义一个基本数据类型,会根据变量类型分配对应的内存空间.比如定义一个int类型的变量a. int a = 10; 内存如下 输入变量a在内存中内存地址 NSLog(@"变量a在内存的内存地址=%p", &a); 基本类型的指针 基本类型的指针变量本质就是保存了变量的内存地址 int a = 10; int *p = &a; 内存如下 输入指针变量保存的内存地址,以及指针变量本身自己在内存分配空间的内存地址 NSLog(@"指针变量p
GNU gdb (Ubuntu -0ubuntu1~ Copyright (C) Free Software Foundation, Inc. License GPLv3+: GNU GPL version or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the exten
使用printf()函数打印字符串的任意部分,请看下例: <span style="font-size:16px;">#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char * source_str = "THIS IS THE SOURCE STRING" ; /* Use printf() to print the f