Function Catching Variable Types , KNACK #3

Опубликовано: 04 Август 2026
на канале: Tx Rx
25
3

In C or C++ Programming Language, it is known that pointers hold the address of the variables or any memory location. If pointers are pointed to the memory location, it can be changed the value of the variable.

As for Functions, any pointer can be passed by itself, or by the address of the pointer. But If the memory location of the pointer is to be changed permanently out of the function, it must be captured with a reference or double-pointer within the function. That is, it is assumed any memory is created inside the local function. Afterward, it is pointed to the pointer captured by the function without any reference or any double-pointer. In this situation, there is no change inside the main function because it is was not captured by reference or double-pointer inside the Function Definition. Actually, they are common mistakes or misunderstandings.