EmbLogic's Blog

STRUCTURES

STRUCTURES is basically a user define datatype. it is a collection of elements of different datatype stored in continues memory location.
SYNTAX:
struct name
{
type element;
type element;
};
struct name variable;

where struct is a keyword.
name is a name of user define data type.
struct name variable is used to define variable globally.
EXAMPLE:
struct distance
{
int feet;
float inches;
};
struct distance d;

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>