Write heterogeneous functions, Computer Engineering

Assignment Help:

Write "heterogeneous" functions

If a program uses simulated, dynamically allocated multidimensional arrays, it becomes possible to write "heterogeneous" functions which don't have to know (at compile time) how big the "arrays" are. In other words, one function can operate on "arrays" of various sizes and shapes. The function will look something like

func2(int **array, int nrows, int ncolumns)

{

}

This function does accept a pointer-to-pointer-to-int.(We must not call this function on arrays like the "true" multidimensional array like a2 ). The function also accepts the dimensions of the arrays as parameters, so that it will know how many "rows" and "columns" there are, so that it can iterate over them correctly. Here is a function which zeros out a pointer-to-pointer, two-dimensional "array":

 


Related Discussions:- Write heterogeneous functions

External communication interfaces, External interface is interface between ...

External interface is interface between I/O interface and peripheral devices. Interface can be characterised into 2 main categories: (a) parallel interface and (b) serial interface

What are the functions of dispatcher, What are the functions of dispatcher?...

What are the functions of dispatcher? There are four fuctions of dispatcher:- A)  Equal distribution of transaction load to the work processes.  B) Management of buffer a

What is the linkage section, The linkage section is part of a known as prog...

The linkage section is part of a known as program that 'links' or maps to data items in the calling program are working storage. It is the part of the called program where these sh

C program, program for finding the area under the curve   #includ...

program for finding the area under the curve   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; int

Which gates are called universal gates, Q. What is Gate? Explain Basic gat...

Q. What is Gate? Explain Basic gates with truth table and necessary circuits. Q. Which gates are called Universal Gates? Why? Q. Give the Dual of the rule 17. Q. Realize

What do you mean by lock synchronization, Q. What do you mean by Lock Synch...

Q. What do you mean by Lock Synchronization? Lock Synchronization: In this method contents of an atom are updated by requester process and sole access is granted before atomic

What is time multiplexed space switching, What is time multiplexed space sw...

What is time multiplexed space switching? Explain w ith a neat diagram. Time division switches, an inlet or an outlet corresponded to a particular subscriber line with one s

What is ternary association, What is ternary association Associations c...

What is ternary association Associations can be binary, ternary, or have higher order. In use, the vast majority of it is binary or ternary associations. Except a ternary assoc

Explain characteristics of the artificial neural networks, Question 1: ...

Question 1: Explain in detail the characteristics of the following artificial neural networks. (a) Recurrent Neural Networks. (b) Self-organising Mapping Neural Networks.

Explain the program invisible registers, What are program invisible registe...

What are program invisible registers? Global and local descriptor tables are found in memory system. In order to specify and access the address of these tables, program invisi

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