N
Narendra
void function1(void *);
void main()
{
int size_offset = 0;
typedef struct
{
int a;
int b;
int c;
char ch;
}A;
A *pst = NULL;
pst = (A*)malloc(sizeof(A)*1);
function1((void*)pst);
}
void function1(void *pStr)
{
// As i need to intialize the structure members. i want to access it's
me
mbers.
// How can i know the structure's
// memory layout in this function?
//Conditions:
//1. i do not want to declare the structure as global or static.
//2. I will pass the structure pointer as void pointer.
}
void main()
{
int size_offset = 0;
typedef struct
{
int a;
int b;
int c;
char ch;
}A;
A *pst = NULL;
pst = (A*)malloc(sizeof(A)*1);
function1((void*)pst);
}
void function1(void *pStr)
{
// As i need to intialize the structure members. i want to access it's
me
mbers.
// How can i know the structure's
// memory layout in this function?
//Conditions:
//1. i do not want to declare the structure as global or static.
//2. I will pass the structure pointer as void pointer.
}