answersLogoWhite

0

Passing Structure to a function:

type specifier function-name (structure-variable);

User Avatar

Wiki User

17y ago

What else can I help you with?

Continue Learning about Engineering

What are the types to pass a structure to functions?

A structure is a type so you just need to pass the structure as you would any other data type: by reference or by value.


How are Structure passing and returning implemented by the complier?

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


Elements of assembly language programming What is A simple assembly scheme pass structure of assembler design of two pass assemblers a single pass assemblers what is macros?

what are the elements of assembly language programming?


What is the difference between classes and structure?

Classes are expanded concepts of structures, and can hold functions along with variables and other information.


What is pass in compiler design?

There are two types of compilers one-pass and multi-pass. Pass means that some of inner operations are repeated several times. If we have one-pass compiler and this source code: i++; i++; i++; Inside compiler it would generate: i = i + 1; i = i + 1; i = i + 1; If compiler would be two-pass: i = i + 3; The more passes compiler has, the better optimized code it can generate, but it is slower because it must repeat some steps again.

Related Questions

What are the types to pass a structure to functions?

A structure is a type so you just need to pass the structure as you would any other data type: by reference or by value.


What are the kinds of sentences according to functions and structure?

sentences according to functions and structure


How are Structure passing and returning implemented by the complier?

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


How can you check whether the contents of two structure variables are same or not?

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.


Wich structure in the male has both reproductive and excretory functions?

The urethra is the male structure which has both reproductive and excretory functions.


What are the structure- functions of a ovum?

barry


How does structure relate to functions?

Cell structure determines cell function


What are the structure-functions of a ovum cell?

barry


How the structure of your hands are complementary to their functions?

they are both ...................


Can you pass argument to procedures?

Yes. Procedures are otherwise known as functions, and functions can accept arguments.


How does organizational structure impact organizational functions?

An organizational structure impacts organizational functions in every aspect. This is what defines the specific roles of each department in the organization.


Wt is the different between structure and class?

A structure is a different from a class in the sense that a class can represent data elements as well as their associated functions whereas a structure can represent only data elements,, not their associated functions.