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

Neural network for two predictors thickness, 2) Consider the following neur...

2) Consider the following neural network for two predictors Thickness and Alignment and two classes Print Quality High and Low. Some weights are shown in the table, including weigh

Describe one graphics and image editing tool, Question : Multimedia inv...

Question : Multimedia involves multiple modalities of text, audio, images, drawings, animation, and video (a) Describe three popular file formats for images (b) Most imag

What are the characteristics of the e-cash, What are the characteristics of...

What are the characteristics of the E-Cash? These kinds of payments, turning the Internet within a transaction oriented forum, need mediums which are easy and cheap (through a

Explain the properties of hypercube, Q. Explain the properties of Hypercube...

Q. Explain the properties of Hypercube? Properties of Hypercube: Hypercube is both edge and node symmetric. The labels of any two neighbouring nodes vary in exactl

Physics, derive an expression for vandar wall equation of state?

derive an expression for vandar wall equation of state?

How can we convert infix expression to a postfix expression, One can change...

One can change an infix expression to a postfix expression using a By using Stack you can convert infix expression to a postfix expression

Explain executing request using message-passing architecture, Explain the E...

Explain the Executing Requests Using a Message-Passing Architecture Executing requests using a message-passing architecture requires good fundamental client-server programming

Explain possible attacks on the wired equivalent privacy, Question : (a...

Question : (a) IEEE802.11 supports two types of network architecture, describe these architectures with the support of diagrams detailing the network components. (b) IEEE80

For what purpose Karnaugh map is used, Karnaugh map is used for the purpose...

Karnaugh map is used for the purpose of ? Ans. Karnaugh map is used for, to minimize the terms in a Boolean expression.

What is a sap system, What is a SAP system? The union of all s/w compo...

What is a SAP system? The union of all s/w components that are assigned to the similar databases is known as a SAP system.

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