新聞中心

EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > C語(yǔ)言中復(fù)雜數(shù)據(jù)定義聲明的舉例

C語(yǔ)言中復(fù)雜數(shù)據(jù)定義聲明的舉例

作者: 時(shí)間:2016-11-29 來(lái)源:網(wǎng)絡(luò) 收藏
  用變量a給出下面的定義a) 一個(gè)整型數(shù)(An integer)b)一個(gè)指向整型數(shù)的指針( A pointer to an integer)c)一個(gè)指向指針的的指針,它指向的指針是指向一個(gè)整型數(shù)( A pointer to a pointer to an intege)r d)一個(gè)有10個(gè)整型數(shù)的數(shù)組( An array of 10 integers)e) 一個(gè)有10個(gè)指針的數(shù)組,該指針是指向一個(gè)整型數(shù)的。(An array of 10 pointers to integers)f) 一個(gè)指向有10個(gè)整型數(shù)數(shù)組的指針( A pointer to an array of 10 integers)g) 一個(gè)指向函數(shù)的指針,該函數(shù)有一個(gè)整型參數(shù)并返回一個(gè)整型數(shù)(A pointer to a function that takes an integer as an argument and returns an integer)h)一個(gè)有10個(gè)指針的數(shù)組,該指針指向一個(gè)函數(shù),該函數(shù)有一個(gè)整型參數(shù)并返回一個(gè)整型數(shù)( An array of ten pointers tofunctions that take an integer argument and return an integer )a) int a; // An integer b) int *a; // A pointer to an integer c) int **a; // A pointer to a pointer to an integer d) int a[10]; // An array of 10 integers e) int *a[10]; // An array of 10 pointers to integers f) int (*a)[10]; // A pointer to an array of 10 integers g) int (*a)(int); // A pointer to a function a that takes an integer argument and returns an integer h) int (*a[10])(int); // An array of 10 pointers to functions that take an integer argument and return an integer

評(píng)論


技術(shù)專(zhuān)區(qū)

關(guān)閉