Structure With Pointer Object

This is the sample Structure program with pointer object.

Syntax for the Structure

struct structure_name
   datatype variable_name1:
   datatype variable_name2;
   datatype variable_name n;
} Pointer_object_name;

Sample Structure program for employee details


struct employee 
   int emp_no;
   char emp_name[20];

void main()
   printf(“enter employee name”);
   printf(“Enter employee number”);
   printf(“Name of the employee is %s :”,e->emp_name);
   printf(“Number of the employee is %d :”,e->emp_no);

hope this will help you. See you on Next Post Don’t forget To subscribe me if any query don’t get hesitate to ask us.

Tell us Your Suggestion

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s