answersLogoWhite

0

  • Computer Programming
  • Java Programming
  • C Programming

How are Structure passing and returning implemented by the complier?

User Avatar

Wiki User

βˆ™ 2008-01-21 19:11:51

Best Answer
Copy

When structures are passed as arguments to functions, the entire structure is typically pushed on the stack, using as many words as are required. (Programmers often choose to use pointers to structures instead, precisely to avoid this overhead.) Some compilers merely pass a pointer to the structure, though they may have to make a local copy to preserve pass-by-value semantics. Structures are often returned from functions in a location pointed to by an extra, compiler-supplied ``hidden'' argument to the function. Some older compilers used a special, static location for structure returns, although this made structure-valued functions non-reentrant, which ANSI C disallows

2008-01-21 19:11:51
This answer is:
πŸ€“
🀯
πŸ€”
User Avatar

Your Answer

Loading...

Related Questions

How structure passing and returning is implemented by compiler?

it uses pointer to stucture.


Pass a structure to functions?

Passing Structure to a function:type specifier function-name (structure-variable);


How to Passing structure reference to function in c?

No references in C, so simply pass the address of the structure.


What led to the passing of the GI Bill?

WW2 coming to an end led to the passing of the GI bill. President Roosevelt wanted to help military personal who were returning to have an easier adjustment.


Formal organization structure?

A formal organization structure clearly shows the line of command from the top to the bottom. This is the same structure used for passing information.


Structure passing through lesser sciatic foramen?

The Pudendal nerve is the structure that passes through the lesser sciatic foramen.


Which is the syntax used for passing a structure member as an argument to a function?

Passing the value: func (strvar.field) or func (strptr->field) Passing the address: func (&strvar.field) or func (&strptr->field)


What structure regulates the amount of light passing to the visual receptors of eye?

Iris


What do you call the process of testing flow of control between a main function and its subordinate function?

function-call and returning (actually, it is 'passing', not 'testing')


Food enters the stomach by passing through a muscular structure at the end of the esophagus called?

The cardiac sphincter.


What is the cell structure that does not allow any food to enter a cell?

The cell membrane allows the passing of some substances.


How does the structure of the sensory neurone maximise the speed of an impulse passing through it?

it lets it go throu faster like a pump


What brain structure directs sensory and motor neuron pathways passing between spinal cord and cerebral cortex?

dendrons


What is the difference between passing an array and passing single value data to a function?

Passing a single value to a function is often just a simple integer. But passing an array, character string or other data structure is typically "pass by reference", or in other words, the calling statement will 'point to' the place in memory where the data structure resides.When a function is called using a pointer to a data structure, both the calling environment and the called function are referencing the same data; any changes made to the data in the structure by the function will have changed the data that the original calling environment sees.However, when a value is passed to a function, the function creates it's own copy of the value, and can change it in any way without changing the original value.


Object-oriented software is another name for structured software?

Object-oriented programming is a more recent subset of structured programming. Structured programming emphasized the need to align data structures with program structure, a concept that is formalized and carried much further in object-oriented programming. However, structured programming advocated hierarchical constraints on program structure that are incompatible with the event-driven, message-passing software architectures commonly implemented in the object-oriented style, today.


What are the structers passing through foramen spinosam?

structure passing through foramen spinosam are 1 middle meningeal artery 2 posterior trunk of middle meningeal vein 3 mandibular branch of meningeal nerve


Why the functions of java is called methods?

because it is capable of taking parameters, passing or returning values as in c++. it has it's own identity as return type, and signature of the method body. It can also be overloaded as well.


What are three specific feasible policies and programs should be developed and implemented by the government in order to effectively arrest this low percentage of passing the licensure exam for teach?

Percentage is so much more mephitic than it is low


How did the magna carta influence american leaders when they were considering the structure of their government?

It kept the king and queen from passing new taxes or changing laws without parlents consent


How many NCAA Division 1A football records for passing does colt brennan not own?

Career Passing yards Career Passing Touchdowns Career Passing yards per game Career Passing Touchdowns per game passing yards in a season, passing yards in a game game passing touchdowns in a season passing yards per game passing touchdowns in a game He owns none of them.


What structure in a cell is responsible for passing on traits to offspring?

DNA in the nucleus is copied and passed on the second cell in a process called binary fission. The ribosomes are responsible for cop0ing the DNA.


What are synonyms for salvation?

death,passing,passing on,


Is Passing good?

No passing out is not good for your body


Are sacks factored into passing yards in the nfl?

For team passing yards, yes ... for individual passing yards, no. A team's total passing yards is the total of individual passing yards minus yards lost from sacks. Sacks are not considered when calculating individual passing yards.


What structure regulates the amount of light passing to the receptors of the eye?

The Iris regulates the light, it has a hole in the middle called the Pupil which becomes smaller when the muscles in the Iris contract, and larger when they relax.