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

What is concurrent control, What is concurrent control? Control resides...

What is concurrent control? Control resides concurrently in various independent objects, every a separate task. A task can wait for input but other task continues implementatio

How can i delete a file, The Standard C Library function is removing. (This...

The Standard C Library function is removing. (This is thus one of the few questions in this section for which the answer is not ''It's system-dependent.'') On older, pre-ANSI Unix

Cg, 1. How can you divide the screen into quadrants? Is the process called ...

1. How can you divide the screen into quadrants? Is the process called as ‘viewing transformations’?

Explain the number unobtainable tone in strowger telephony, Explain the num...

Explain the number unobtainable tone in strowger telephony with waveforms and the timings. In the following figure illustrates the number unobtainable tone that is continuous

Prolog programming language - artificial intelligence, Prolog Programming L...

Prolog Programming Language - Artificial intelligence: Most of the programming languages are procedural: the programmer specifies exactly the correct instructions (algorithms)

Design the counter using sequential logic, Q. Design the counter using sequ...

Q. Design the counter using sequential logic with following counting sequence using RS- flip-flops. 000, 100, 101, 111, 010, ... ... ... ... ... ... ... ... ... ...

What is mini frame size where propagation speed is 200 m µs, A CSMA/CD bus ...

A CSMA/CD bus spans a distance of 1.5 Km. If data is 5 Mbps, What is minimum frame size where propagation speed in LAN cable is 200 m µs. Usual propagation speed in LAN cables

What is assembly condition codes, Condition codes are the list of possible ...

Condition codes are the list of possible conditions that can be tested through conditional instructions. Typical conditional instructions have: conditional branches, conditional ju

Define pvm library routines, Q. Define PVM library routines? In this se...

Q. Define PVM library routines? In this segment we will give a short description of the routines in PVM 3 user library. Each PVM program must comprise the PVM header file 'pvm3

Explain subscriber access to strowger systems, What are the basic approache...

What are the basic approaches to the design of subscriber access to Strowger systems? Describe them. A step by step switching system has three main parts as demonstrated in fig

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