D
DeltaOne
#include<stdio.h>
typedef struct test{
int i;
int j;
}test;
main(){
test var;
var.i=10;
var.j=20;
printf("i==%d i==%d \n",var,var.i);
return 1;
}
Compiler in VC++ and see that you get the output is i==10 i==20
Can any one explain Why this thing happens?even though i give the
address of var.i why the value of j is geting printed?
typedef struct test{
int i;
int j;
}test;
main(){
test var;
var.i=10;
var.j=20;
printf("i==%d i==%d \n",var,var.i);
return 1;
}
Compiler in VC++ and see that you get the output is i==10 i==20
Can any one explain Why this thing happens?even though i give the
address of var.i why the value of j is geting printed?