<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[[实践OK]C语言函数指针再学习。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Mon, 10 May 2021 01:49:14 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	此次学习来源：<a href="https://mp.weixin.qq.com/s/YqZI4XUlsyPpaGIjy0pG3A" target="_blank">https://mp.weixin.qq.com/s/YqZI4XUlsyPpaGIjy0pG3A</a><br/>#cat p.c <br/><textarea name="code" class="php" rows="15" cols="100">
#include &lt;stdio.h&gt;
void (*fun)(int a);

void function(int value)
&#123;
&nbsp;&nbsp;printf(&quot;value= %d&#92;r&#92;n&quot;,value);
&#125;

int main(void)
&#123; 
 fun = function;//把function赋值给fun
 fun(520);//fun就等同于function
&nbsp;&nbsp;
&nbsp;&nbsp;while(1)
 &#123; 
 &#125; 
&#125;
</textarea><br/><br/>#./p<br/>value= 520<br/><br/>cat pp.c<br/><textarea name="code" class="php" rows="15" cols="100">
#include &lt;stdio.h&gt;
int res;
//void (*fun)(int a);
int (*fun)(int a);

int function(int value)
&#123;
&nbsp;&nbsp;return value;
&#125;
int main(void)
&#123; 
 fun = function;//把function赋值给fun
 res = fun(520);//fun就等同于function
&nbsp;&nbsp;
 printf(&quot;res = %d&quot;,res);
&nbsp;&nbsp;while(1)
 &#123; 
 &#125; 
&#125;
</textarea><br/>#./pp<br/><br/><br/>cat ppp.c<br/><textarea name="code" class="php" rows="15" cols="100">
#include &lt;stdio.h&gt;
char temp[3]=&#123;1,2,3&#125;;
char *p;
int main(void)
&#123; 
&nbsp;&nbsp;p=temp;//将数组名赋值给指针变量p，p就指向数组temp的首地址
&nbsp;&nbsp;
&nbsp;&nbsp;printf(&quot;value0 = %d&#92;r&#92;n&quot;,*p);&nbsp;&nbsp;&nbsp;&nbsp;//p就代表数组的第一个数据的地址
&nbsp;&nbsp;printf(&quot;value1 = %d&#92;r&#92;n&quot;,*(p+1));//p+1就代表数组的第二个数据的地址
&nbsp;&nbsp;printf(&quot;value2 = %d&#92;r&#92;n&quot;,*(p+2));//p+2就代表数组的第三个数据的地址
&nbsp;&nbsp;
&nbsp;&nbsp;printf(&quot;temp[0] = %d&#92;r&#92;n&quot;,p[0]);//p[0]等同于temp[0]
&nbsp;&nbsp;printf(&quot;temp[1] = %d&#92;r&#92;n&quot;,p[1]);//p[1]等同于temp[1]
&nbsp;&nbsp;printf(&quot;temp[2] = %d&#92;r&#92;n&quot;,p[2]);//p[2]等同于temp[2] 
&nbsp;&nbsp;while(1)
 &#123; 
 &#125; 
&#125;
</textarea><br/>#./ppp<br/>value0 = 1<br/>value1 = 2<br/>value2 = 3<br/>temp[0] = 1<br/>temp[1] = 2<br/>temp[2] = 3<br/><br/>以前的学习：<br/><a href="https://jackxiang.com/post/7485/" target="_blank">https://jackxiang.com/post/7485/</a>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践OK]C语言函数指针再学习。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>