I have structure
typedef struct
{
char employee_name[32];
char organisation[32];
}info;
How can I Initialized a single or more elements of info .
I am doing like this at the start of the code:
info info_data= {
{'d','a','v','i','d',' ','s','c','h','o','l','e','s','\0'},
{'x','y','z',' ','I','n','c','\0'}
};
This works fine but I want to avoid putting all the names with each character enclosed in ' ' and adding '\0' at the end.Is there a better way to implement this.Code has to run in an embedded processor and needs to be memory and speed optimized.