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

Illustrate working of pocket and pc-card modems, Q. Illustrate working of P...

Q. Illustrate working of Pocket and PC-Card Modems? Pocket Modems: Small external Modems used with notebook PCs.  PC-Card Modems:  PC and Modems are read with PCMCIA slots w

Risk detection, what is meant by risk detection in software project managem...

what is meant by risk detection in software project management

Computer organisation, How many 32K X 1 RAM chips are needed to provide a m...

How many 32K X 1 RAM chips are needed to provide a memory capacity 256 kilobytes?

Explain region, What is a Region? A Region is a continuous area of a p...

What is a Region? A Region is a continuous area of a process's address space (like text, data and stack). The kernel in a "Region Table" that is local to the process mainta

Explain about strategic planning and sensitivity training, Q. Explain about...

Q. Explain about strategic planning and sensitivity training? Formulation of business strategy with the due consideration of environmental analysis and organizational appraisal

Define apple mobileme calendar, Define Apple MobileMe Calendar The Mobi...

Define Apple MobileMe Calendar The MobileMe Calendar is a web-based calendar that can be accessed from any computer linked to the Internet, Mac or Windows. What makes it more u

State about the mainframe computer, Mainframe computer Mainframe comput...

Mainframe computer Mainframe computers are very large, often can fill an entire room. They can store a large amount of information, can execute many tasks at the same time, can

How do you ensure that our records are scanned accurately, How do you ensur...

How do you ensure that our records are scanned accurately? Not only do we have a highly trained and capable staff, we also have quality controls in place to make sure your reco

Differentiate between worms and boot-sector viruses, Question: (a) Pro...

Question: (a) Program instructions and data are brought into memory first, in order to be executed. Explain how the CPU enables an instruction to be executed? (b) Describe

Which transistor is used in every cell of eprom, Floating gate Avalanche In...

Floating gate Avalanche Injection MOS (FAMOS) transistor is used in every cell of EPROM.

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