#include <stdio.h>
#include <string.h>

#if 0
struct operations {
    int a;
    int b[5];
    char c[10];
};

void out(struct operations *op) {
    printf("%d\n", op->a);
    for(int i = 0; i < 4; i++){
        printf("%d ", op->b[i]);
    }
    printf("\n%s", op->c);
}

int main() {
    struct operations op;
    op.a = 6;
    for(int i=0;i<3;i++)
    {
        op.b[i]=i+1;
    }
    strcpy(op.c,"hii hello");
    out(&op);
    return 0;
}
#endif

typedef struct {
    int a;
    int c[5];
    char b[10];
} Operations;

void printOperations(const Operations* op) {
    printf("a = %d\nc = {", op->a);
    for(int i = 0; i < 4; i++){
        printf("%d, ", op->c[i]);
    }
    printf("}\nb = %s\n", op->b);
}

int main() {
    Operations op = {6, {1, 2, 3, 4}, "hii hello"};
    printOperations(&op);
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: