<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu,debian,redhat -linuxany.com &#187; malloc</title>
	<atom:link href="http://www.linuxany.com/archives/tag/malloc/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>C语言中几种指针的指针用法</title>
		<link>http://www.linuxany.com/archives/1231.html</link>
		<comments>http://www.linuxany.com/archives/1231.html#comments</comments>
		<pubDate>Fri, 26 Feb 2010 15:47:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[malloc]]></category>
		<category><![CDATA[pointer]]></category>
		<category><![CDATA[sizeof]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1231</guid>
		<description><![CDATA[1、 简单来说 int **p 是一个指向2维数组的指针。 数学上一个2维数组描述有NR行，NC列的矩阵，例如 int a[NR][NC]; 为了使程序有通用性，编程时不把这个数组行列数定死，而让使用者临时输入行列数，再动态分配数组存放单元，这时，我们声明一个2维数组的指针(或叫二重指针）。 int NR,NC; int **a; int i,j; &#160; // 假定键盘输入 NR=5，NC=3，动态分配数组: a = (int **)&#160;malloc(sizeof(int *) * NR); for&#160;(j=0;j&#60;NR;j++) a[j] = (int *) malloc(sizeof(int) * NC); // 现在可以直接用 a[j][i] 作运算，不用管 数组元素的地址。 // 例如： for&#160;(j=0;j&#60;NR;j++) for (i=0;i&#60;NC;i++) {&#160; a[j][i] = (j+1)*100 + i; }; &#160; for&#160;(j=0;j&#60;NR;j++){&#160; for&#160;(i=0;i&#60;NC;i++) printf(&#34;%3d [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1231.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

