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

Differentiate between protection and security, Differentiate between protec...

Differentiate between protection and security. Operating system contains a collection of objects, software or hardware. All objects have a unique name and can be accessed by

Using library methods returns number of threads, Q. Using Library methods r...

Q. Using Library methods returns number of threads? #include void subdomain(float x[ ], int istart, int ipoints) { int i; for (i = 0; i x[istart+i] = 123.456;

Mips - computer architecture, MIPS - computer architecture: The MIPS ...

MIPS - computer architecture: The MIPS ISA, so far 3 instruction formats Fixed 32-bit instruction 3-operand, load-store architecture 32 general-purpose register

Why do businesses need systems analysts, Q. Why do businesses need systems ...

Q. Why do businesses need systems analysts? A computerized system allows an organization to provide accurate information and respond faster to queries, events etc. If a busines

Define wide area network, Q. Define Wide Area Network? Wide Area Networ...

Q. Define Wide Area Network? Wide Area Network (WAN): It takes a large geographical area and frequently owned by a state. Data transfer rate is low (few KBPS to 10 MBPS) and er

excitation diagram indicating , a.  Sketch the excitation diagram indicati...

a.  Sketch the excitation diagram indicating the last states and next states. b. Build the circuit using a Synchronous Counter with JK FF and NAND gates only. Replicate the circ

Describe the functions of an operating system, Question: (a) Software ...

Question: (a) Software may be categorized into System software and Application software. Differentiate between these two categories, using examples to support your answer.

Transaction, Explain Shadow Copy Scheme in detail.

Explain Shadow Copy Scheme in detail.

Determine waiting and average waiting time of CPU, CPU burst time indicates...

CPU burst time indicates the time, the process needs the CPU. The following are the set of processes with their respective CPU burst time     (in milliseconds). Process

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