EmbLogic's Blog

this is the simple and conceptual programme on structure, which is used to hold the structure variable in the array of structure.

we can also implement the array if structure as show below:

#include<stdio.h>
struct abc
{
int a;
int b;
}a1,a2,a3[2];

int main()
{
a1.a=3;
a1.b=4;
a2.a=5;
a2.b=6;
a3[0]=a1;
a3[1]=a2;
printf(“%d”,a3[0].a);//print the output as 3 because a1.a=3.
return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>