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

What are concentrators, What are concentrators? Explain how it helps in con...

What are concentrators? Explain how it helps in connecting number of subscribers. In rural areas, subscribers are usually dispersed. This is both unessential and expensive to g

Multi-layer artificial neural networks, Multi-Layer Artificial Neural Netwo...

Multi-Layer Artificial Neural Networks : However we can now look at more sophisticated ANNs that are known as multi-layer artificial neural networks it means they have hidden

Illustrate the disadvantages of wireless technology, Disadvantages of wirel...

Disadvantages of wireless technology -  Range can be very limited -  Possible interference from nearby electronic devices -  Security issues (i.e. tapping illegally into

Nmknl''knl, Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Application of Theory of computation in DBMS, Sir/Mam, I want to know the a...

Sir/Mam, I want to know the application of Theory of computation in DBMS

Explain in details the various standard i/o interfaces, Explain in details ...

Explain in details the various standard I/O interfaces. The various standard I/O interfaces are:  1. The Peripheral component interconnect(PCI) bus is a standard that suppor

High level expertise, The most useful feature of an expert system is the h...

The most useful feature of an expert system is the high level expertise it provides to aid in problem solving. This expertise can represent the best thinking of the top

What is public key cryptography, What is Public Key Cryptography? Pub...

What is Public Key Cryptography? Public-key cryptography is a type of modern cryptography that allows users to communicate safely without any previously agreeing on a shared

Define the unified modelling language, Define the Unified Modelling Languag...

Define the Unified Modelling Language  (UML) is used to express construct and relationships of complex systems. This was created in response to a request for proposal (RFP) fro

What are the features of cisc processors, What are the Features of CISC Pro...

What are the Features of CISC Processors The standard features of CISC processors are listed below:  CISC chips have a large amount of dissimilar and complex instructions.

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