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

How do you perform functional testing under load, Functionality under load ...

Functionality under load can be tested by running various Vusers concurrently. By enhancing the amount of Vusers, we can verify how much load the server can sustain.

Mathematical model, how to write mathematical model for circular linked lis...

how to write mathematical model for circular linked list

What start bit and stop bit, What start bit and stop bit The first bit ...

What start bit and stop bit The first bit known as the Start bit is always a zero and it is used to show the beginning of the character The last bit is known as the stop bit

Project, the project database is avilable?

the project database is avilable?

Which transistor is used in every cell of eprom, Floating gate Avalanche In...

Floating gate Avalanche Injection MOS (FAMOS) transistor is used in every cell of EPROM.

What is ternary association, What is ternary association Associations c...

What is ternary association Associations can be binary, ternary, or have higher order. In use, the vast majority of it is binary or ternary associations. Except a ternary assoc

Re:- exam help, Hello there i have 4 exams of ICT and i am after a tutor wh...

Hello there i have 4 exams of ICT and i am after a tutor who can help me in those 4 subjects. One hour for each subjects will be good for me as i have sample papers ready for all s

Classification of parallel computers , Classification Of Parallel Computer...

Classification Of Parallel Computers  Introduction Parallel computers are those that underline the parallel processing among the operations in some way. In the last unit,

What is digitizers, What is Digitizers A common device for drawing, pai...

What is Digitizers A common device for drawing, painting, or interactively selecting coordinate positions on an object is a digitizer. These devices can be used to input coordi

Explain an intermediate language, Assemblies are made up of IL code modules...

Assemblies are made up of IL code modules and the metadata that explains them. Although programs may be compiled by an IDE or the command line, in fact, they are easily translated

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