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

Qwerty - keyboard layout, Q. QWERTY - Keyboard Layout ? A keyboard layo...

Q. QWERTY - Keyboard Layout ? A keyboard layout is arrangement of keys across the keyboard. There is one keyboard layout which anybody who has worked on a standard keyboard or

Find sop expression, A. F(X, Y, Z) = ∑(0, 1, 2, 6, 7) using TRUTH TABLE onl...

A. F(X, Y, Z) = ∑(0, 1, 2, 6, 7) using TRUTH TABLE only B. F(X,Y,Z) = ∑ (4,6,7,8) + D(2,5,11,12) using K-Map 1. Find SOP expression 2. Simplify SOP expression 3. Implem

Explain advantageand disadvantages of a dynamic document, Explain advantage...

Explain advantageand disadvantages of a dynamic document.   The chief advantages of a dynamic document lie in its capability to report current information. For illustratio

What is public key cryptography, What is Public Key Cryptography Publi...

What is Public Key Cryptography Public-key cryptography is a form of modern cryptography which permits users to communicate safely without lastly agreeing on a shared secret

Explain form and input tag, Q. Explain FORM and INPUT Tag? A good way t...

Q. Explain FORM and INPUT Tag? A good way to learn about forms is to make use your notepad editor and make a new HTML document. Save it as form1.htm in some folder somewhere. Y

Exdplain instruction buffers, Instruction buffers For taking the comple...

Instruction buffers For taking the complete advantage of pipelining pipelines must be filled continuously. So instruction fetch rate must be matched with pipeline consumption r

#logic function, Minimize the following logic function using K-maps and rea...

Minimize the following logic function using K-maps and realize using NAND and NOR gates. F(A,B,C,D) =?_m(1,3,5,8,9,11,15) + d(2,13).

Develop inventory management system and time-tabling systems, Problem: ...

Problem: Develop three sub-systems namely Staff Profiling System, Inventory Management System and Time-tabling systems. (a) Show about any three design patterns you have us

How do you create a permanent cookie, How do you create a permanent cookie?...

How do you create a permanent cookie?  By setting the expiry date of the cookie to a later on time (like 10 years later.)

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