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

Give an example of shortest job next scheduling, Consider the following set...

Consider the following set of jobs with their arrival  times, execution time (in minutes), and deadlines. Job Ids Ar r ival Time E xecuti

What is content addressable memory, What is content addressable memory? ...

What is content addressable memory? The memory unit accessed by the content is known as an associative memory or content addressable memory. This type of memory is accessed con

Explain about olap, OLAP is called as online analytical processing which gi...

OLAP is called as online analytical processing which gives answers to queries which are multi dimensional in nature. It composes relational reporting and data mining for giving sol

Set up the minunit test framework - mortgage code, Set up the minunit test ...

Set up the minunit test framework examples in your environment (i.e. build or compile the code). Once you can run the example, use the minunit test framework to create and run a bo

What is macro call, What is macro call? Explain. Macro call: While a...

What is macro call? Explain. Macro call: While a macro name is used along with a set of actual parameters this is replaced through a code generated from its body. Such code

Difference between static call and dynamic call, In the case of Static call...

In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, t

What are the steps in executing the program, What are the steps in executin...

What are the steps in executing the program? 1.Fetch 2.Decode 3.Execute 4.Store

The field sy-stepl, The field SY-STEPL refers to The index of the scre...

The field SY-STEPL refers to The index of the screen table row that is presently being processed.  The system variable SY-stepl only has a meaning within the confines of LOOP.

Define the don''t care states - simplifying k maps, Define the Don't Care S...

Define the Don't Care States - Simplifying K Maps? The Truth table specifications for a logic function may not to include all possible combinations of the input binary digits for

Emails, Compare and contrast POP e-mail to Web-based e-mail systems in term...

Compare and contrast POP e-mail to Web-based e-mail systems in terms of control, security, and accessibility.

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