Answers for "how to pass a struct array to a function in c"

C
1

how to pass an array of structs as an argument in c

struct Items
{
    char code[10];
    char description[30];
    int stock;
};

void ReadFile(struct Items items[10])
{
    ...
}

void xxx()
{
    struct Items MyItems[10];
    ReadFile(MyItems);
}
Posted by: Guest on September-01-2021

Code answers related to "how to pass a struct array to a function in c"

Code answers related to "C"

Browse Popular Code Answers by Language