how we can strore a nested structure values in arrays
typedef struct {
char ChannelNo[3]; //"P1"
unsigned int ChannelPin; //23
char State; //'o'
}test;
typedef struct {
test One[3];
test two[3];
test three[3];
test four[3];
test five;
test six[3];
}matrix;
matrix x[] =
{
// [0]
{
.One = {
{.ChannelNo = "P4", .ChannelPin = 23, .State = 'o'},
{.ChannelNo = "P1", .ChannelPin = 98, .State = 'o'},
{.ChannelNo = "P0", .ChannelPin = 23, .State = 'o'},
},
.two = {
{.ChannelNo = "P5", .ChannelPin = 79, .State = 'd'},
{.ChannelNo = "P4", .ChannelPin = 79, .State = 'e'},
{.ChannelNo = "P5", .ChannelPin = 79, .State = 'r'},
},
// ......
.five = {.ChannelNo = "P5", .ChannelPin = 79, .State = 'r'},
},
// [1]
{
.One = {
{.ChannelNo = "P4", .ChannelPin = 23, .State = 'o'},
{.ChannelNo = "P1", .ChannelPin = 98, .State = 'o'},
{.ChannelNo = "P0", .ChannelPin = 23, .State = 'o'},
},
.two = {
{.ChannelNo = "P5", .ChannelPin = 79, .State = 'd'},
{.ChannelNo = "P4", .ChannelPin = 79, .State = 'e'},
{.ChannelNo = "P5", .ChannelPin = 79, .State = 'r'},
},
// ......
.five = {.ChannelNo = "P5", .ChannelPin = 79, .State = 'r'},
},
// ......
};
Also in C:
- measure time in c
- azure storage emulator config
- program to create insert, delete and display operations on singly linked list in c
- how many archaeologists are there
- es palindromo
- declaring a volatile in c
- read from command line c
- confirm sweet alert
- arduino internal pull up resistor
- os.listdir to array
- how to transform a char to ascii code in c
- delete docker image repository none
- typedef vs #define
- where is /dev/kvm
- Exception caught by image resource service
- mirzapur 2 release date and time
- material ui icons
- how we can strore a nested structure values in arrays
- keep last n bits
- ModuleNotFoundError: No module named 'easydict'
- No module named 'vectormath'
- mariadb unknown collation: 'utf8mb4_0900_ai_ci'
- C %s
- C if