hi all,
I have 2 structure of as follows:
struct a
{
int x;
void *y;
};
struct b
{
char *u;
int v;
float z;
};
and in my code I write as
main()
{
struct a a1;
struct b b1;
.
.
b1.u = "hello";
b1.v = 10;
b1.z = 20.1;
.
.
a1.y = (struct b *)&b1;
.
.
fun(&a1);
.
.
}
fun(struct a *x1)
{
struct b y1;
.
.
y1 = (struct b *)x1;
printf("%s\n",y1.u);
.
.
}
what I want to know is that is it possible to access the struct b
component in struct a without using the temperory variable y1?
Thanks and regards,
Raju