recently i studied one document for difference between structure and union. I that they said, union did not support the dynamic memory allocation and structure should support dynamic memory allocation.
I tried one program with dynamic memory allocation as below
Am i correct? above program can prove that union will support dynamic memory allocation?
union koti *p;
p= (union koti *)malloc(1 * sizeof(union koti));
Please correct me if i am wrong.
Thanks in advance.