coderz.py

Keep Coding Keep Cheering!

Pointers in DSA

What are pointers? Pointers are variables that are used to save the position of a value in memory. A memory address is stored in a pointer to a location. Pointers are a key notion in data structures and algorithms (DSA) that provide significant memory management and data manipulation capabilities. Understanding pointers allows programmers to optimize […]

May 22, 2023 | Data Structure | No comments

Upcasting in C++

Upcasting is the process of creating the derived class’s pointer or reference from the base class’s pointer or reference. It refers to the process of converting a derived class’s reference or pointer to a base class’s reference or pointer. Upcasting is a safer casting technique than downcasting. It supports public inheritance, which allows references to […]

October 26, 2022 | C++ | No comments

Class Members Pointers in C++

A pointer to a C++ class is created in the same way that a pointer to a structure is created, and to access members of a class pointer, use the member access operator ->. To better understand the concept of a pointer to a class, consider the following example: Example: Output: Pointer to Data Members […]

October 20, 2022 | C++ | No comments

References in C++

C++ references allow you to give a variable a second name that you can use to read or modify the original data stored in that variable. Once a reference has been initialized with a variable, it can be referred to using either the variable name or the reference name. For instance, A variable can be […]

October 18, 2022 | C++ | No comments

Advertisement