What is the main use of structures, Computer Engineering

Assignment Help:

 

What is The main use of structures

The main use of structures is to lump together collections of disparate variable types, so they can conveniently be treated as a unit. For example, if we were writing a student record we might need for each identifier information like his name (a character array), his reg.no (an integer), and his address ( a character array).

i.e.

char name[15];

int regno;

char address[40];

We can make a structure out of this quite easily.  We first tell C what the structure will look like, that is, what kinds of things it contains; after that we can actually reserve storage for it, either in the same statement or separately.  The simplest thing is to define it and allocate storage all at once:

struct stud{

 student;

char name[15];

int regno;

char address

 


Related Discussions:- What is the main use of structures

#project, how to build PVR set-top box using raspberry

how to build PVR set-top box using raspberry

Explain the term - strong typing and weak typing, Explain the term - Strong...

Explain the term - Strong Typing and  Weak Typing Strong Typing : When any operation upon an object can be checked during compile time, when type is confirmed forcefully.

Show the connection between different networks, Q. Show the Connection betw...

Q. Show the Connection between different networks? The connection between different stages is made in following manner:  all outputs of 1 st crossbar switch of first stage a

Operating system, define request edge and assignment edge

define request edge and assignment edge

Signed 1’s complement representation, Q. Signed 1s complement representatio...

Q. Signed 1s complement representation? Another possibility that is also simple is use of signed 1's complement. Signed 1's complement has a principal. Add both numbers includi

Define system space, Define system space.  Management routines are part...

Define system space.  Management routines are part of the operating system of the computer. It is suitable to assemble the OS routines into a virtual address space.

How web-based word processing works, How Web-Based Word Processing Works? ...

How Web-Based Word Processing Works? Web-based word processors are hosted in the cloud, not on the hard drive-as are the documents formed with these applications. And these web

Rdbms relational database system, RDBMS relational database system - Re...

RDBMS relational database system - Relational databases are composed of relations and managed through relational operations, and governed through data integrity constraints.

State about the internet services, State about the Internet services I...

State about the Internet services Internet services are provided automatically, in many other implementations the certificate is stored on a separate database or token such as

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd