image
/*C語言 傳遞結構陣列*/
#include<stdio.h>
#include<stdlib.h>
struct data
{
    char name[10];
    int score;
};

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 將結構的位址傳遞到函數裡*/
#include<stdio.h>
#include<stdlib.h>
struct data
{
    char name[10];
    int score;
};

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 將結構的值傳遞到函數裡*/
#include<stdio.h>
#include<stdlib.h>
struct data
{
    char name[10];
    int score;
};
//定義為全域結構

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 指向結構的指標*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    int i, j = 0, k;

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 指向結構的指標*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    struct data
    {
        char name[10];
        int math, eng;
    }student, *ptr;

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 結構陣列*/
#include<stdio.h>
#include<stdlib.h>
#define i 2
int main(void)
{
    int j;

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 巢狀結構*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    struct date
    {
        char month[10];
        int day;
    };

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 結構變數將值設給另一個結構變數*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    struct data
    //定義結構
    {
        char name[10];
        int score;
    }student1 = {"Jackson", 81};

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 結構變數設定初值*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    struct data
    //定義結構
    {
        char name[10];
        int score;
    }student = {"Jackson", 81};

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 結構變數*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    struct data
    //定義結構
    {
        char name[10];
        int score;
    }student;

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 雙重指標更該二維陣列大於50的值*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    int i[3][4] = { {10, 20, 30, 40},
                  {40, 50, 60, 50},
                  {70, 80, 90, 100} };
    int j, k;

愛學習 發表在 痞客邦 留言(0) 人氣()

image
/*C語言 雙重指標印出二維陣列位址*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    int i[3][4] = { {1, 2, 3, 4},
                  {4, 5, 6, 5},
                  {7, 8, 9, 10} };
    int j, k;

愛學習 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。