Computer Science, asked by Anonymous, 8 months ago

The function returning the address of a local variable results in​

Answers

Answered by vaishnavibarad8
4

Answer:

A function returns the address of a stack variable, which will cause unintended program behavior, typically in the form of a crash.

Explanation:

this is your answer please thanks me and mark me as brainlist.

Answered by umarmir15
0

Answer:

When the execution of the function terminates (returns), the local variables are destroyed or we can say in computer language the local variables are being crashed . Code lens helps you to visualise the function command because the local variables disappear after the function returns.

Explanation:

The return function has a value, you must include a return statement of the function, followed by the value to be returned, before the function's end statement. If you do not include a return statement or if you do not specify a value after the keyword return, the value returned by the function is unpredictable.

A local variable is a variable that is only accessible within a specific part of a program. These variables are usually local to a subroutine and are declared or defined within that routine. Parameters that are defined by value can also be considered as local variables.

Similar questions