Skip to content

SejalCh/Pointer-Operations-in-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Pointer-Operations-in-CPP

##AIM: To study about pointer operations in C++

##THEORY:

In C++ pointer operations are nothing but call by value and call by reference.

Call by value:
In call by value, original value is not modified.In this, value being passed to the function is locally stored by the function parameter in stack memory location. If you change the value of function parameter, it is changed for the current function only. It will not change the value of variable inside the caller method such as main().

Call by reference:
In call by reference, original value is modified because we pass reference (address). Here, address of the value is passed in the function, so actual and formal arguments share the same address space. Hence, value changed inside the function, is reflected inside as well as outside the function.

Screenshot 2023-10-10 163717

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages