This blog is about providing theory as well as simple executable codes of different programming languages such as java, C, C++, and web programming, etc. This blog will be helpful to the IT students to learn about programming.

Showing posts with label constant pointer and pointer to constant. Show all posts
Showing posts with label constant pointer and pointer to constant. Show all posts

Monday, February 20, 2023

Define constant pointer and pointer to constant with a suitable example. write a program to demonstrate conversion from one class to another class type without using constructor.

February 20, 2023 0
 In C++, a pointer is a variable that stores the memory address of another variable. There are two types of pointer declarations: constant pointer and pointer to constant.A constant pointer is a pointer whose value (i.e., the memory address it points to) cannot be changed. However, the value stored at the memory address can be modified. This is done by declaring the pointer variable as constant using the const keyword.int x = 10;int y = 20;int *const...

Slider Widget