Why pointer variable to a function as an argument, Computer Engineering

Assignment Help:

Why pointer variable sometimes desirable to pass a pointer to a function as an argument?

Frequently, a called function needs to make changes to objects declared in the calling function. For example, the function, scan(), needs to access objects in the calling function to store the data read and converted into an object defined there. Therefore, we supply scan() with the address of objects rather than their values.

Another common use of pointers is to write functions that ''return'' more than one value. As we have seen, every function in C returns a value as the value of the function; however, if a function's meaning includes the return of several pieces of information, this single return value is not sufficient. In these cases, we can have the function return multiple data values indirectly, using pointers.

 


Related Discussions:- Why pointer variable to a function as an argument

What are the benefits of micro programmed control, a. What are the benefits...

a. What are the benefits of hardwired and micro programmed control? b. Sketch neat diagram of single bus organization of CPU showing ALU, all types of registers and the data pat

Define the components of a process precedence sequence, Define the componen...

Define the component of a process precedence sequence? Ans. Process name, sequence operator and also concurrency operator components are process precedence sequence.

what respects the advance builds, Describe your choice specifically and fu...

Describe your choice specifically and fully, explaining and discussing at length in what respects the advance builds upon or departs from present technology or practice and the sev

Explain a public key encryption system, Explain a public key encryption sys...

Explain a public key encryption system? A public key encryption system permits only the correct receiver to decode the data.

What is disk controller and word count, What is disk controller The ele...

What is disk controller The electronic circuit that controls the operation of the disk known as disk controller.  word count The number of words in the block to be tran

What is over-clocking, Overclocking is the process of making a computer or ...

Overclocking is the process of making a computer or component operate faster than the clock frequency particular by the manufacturer by modifying system parameters. One of the most

What are the two phases in the advancement of linux, What are the two phase...

What are the two phases in the advancement of Linux? State some Applications of Open Source Systems? Finance Educational Data Storage and Management ERP (Ent

How to make frames for web documents, Q. How to make frames for web documen...

Q. How to make frames for web documents? Intelligent use of frames can give your pages a cleaner look and make easier to navigate. The fundamental concept goes like this: Every

State some criterias and their effects on a database, It is possible to ent...

It is possible to enter one or more criteria in the rows which can influence your database significantly. >="Callahan" this returns all the several records from Callahan to the

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