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...
Showing posts with label conversion from one class to another class type without using a constructor. Show all posts
Showing posts with label conversion from one class to another class type without using a constructor. 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.
Niraj shrestha
February 20, 2023
0