国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
數(shù)組指針與函數(shù)指針
http://blog.csdn.net/slj_win/article/details/21543463
2014
  #include "stdafx.h"

void te_array_ptr(void)
{
//correct
//char a[10] = "123456";
//char (*p)[10];
//p = &a;
//printf("%c\r\n",(*p)[1]);


//correct
char a[10] = "123456";
char (*p)[10] = &a;
printf("%c\r\n",(*p)[1]);


//char *a = "123456";
//char (*p)[10] = (char(*)[10])a;
//printf("%c\r\n",(*p)[1]);


//char *a = "123456";
//char (*p)[10];
//p = (char(*)[10])a;
//printf("%c\r\n",(*p)[1]);


//error
//char a[10] = "123456";
//char (*p)[10];
//p = a;
//printf("%c\r\n",p[1]);


//correct
//char a[10] = "123456";
//char *p;
//p = a;
//printf("%c\r\n",p[1]);
}


void te_function(void)
{
printf("te_function is called !\r\n");
}


void te_fun_ptr(void)
{
//correct
//void (*pfun)(void);
//pfun = te_function;
//pfun();


//correct
void (*pfun)(void);
pfun = &te_function;
(*pfun)();


//correct
//void (*pfun)(void);
//pfun = te_function;
//(*pfun)();


//correct
//void (*pfun)(void);
//pfun = &te_function;
//pfun();
}


int main(int argc, char* argv[])
{
te_array_ptr();
te_fun_ptr();
printf("Hello World!\n");
while(1);
return 0;
}     
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
C語言中的函數(shù)指針與指針函數(shù)
C語言難點(diǎn)分析整理
考查嵌入式C開發(fā)人員的最好的0x10道題
如何寫參數(shù)個(gè)數(shù)不定的函數(shù)(即類似printf的函數(shù))
動(dòng)態(tài)內(nèi)存分配,地址對(duì)齊
C/C++內(nèi)存與運(yùn)行時(shí)深入研究
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服