answersLogoWhite

0


Best Answer

1. pointer to a constant means you can not change what the pointer points to

2. constant pointer means you can not change the pointer.

User Avatar

Wiki User

โˆ™ 2010-03-23 13:10:28
This answer is:
User Avatar
Study guides

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What do unix and Linux have in common

โžก๏ธ
See all cards
3.91
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
44 Reviews

Add your answer:

Earn +20 pts
Q: Difference between pointer to constant and constant pointer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What difference between a pointer variable and a pointer constant?

The former is variable, the latter is constant.


What is the difference between the Constant pointer and pointer constant and explain it with an example?

Pointer to constant *ptr=10 statement is invalid in pointer to constant i.e assigning value is illegal ptr++ statement is valid in pointer to constant. pointer can be incremented and decremented, Pointer is pointing to constant data object. Declaration: const int *ptr; Constant pointers: *ptr= 10 is absolutely valid in constant pointers i.e assigning value is perfectly legal ptr+++ statement is invalid in constant pointers. pointer can not be incremented or decremented. Declaration; int *const ptr;


What is the difference between structure and pointer?

A structure is a collection of primitives or other structures. A pointer is a memory address. Comparison of the two is like comparing bowling balls to cinder blocks. You can say that a structure defines the layout of the data, while a pointer points to data that is a particular structure.


What is the difference between a structure pointer and a pointer to structure?

Nothing, they are synonyms.


What is the difference between constant and non-constant motion?

Acceleration is the difference between constant and non-constant motion.


What is the difference between the mouse pointer and the cursor?

The mouse pointer is called a cursor


What is the difference between pointer and array?

Pointer holds an address Array holds values


Difference between rate constant and specific rate constant?

There is no difference between them they are same rate constant is another name of specific rate constant


What is the difference between a constant in a graph and a constant in a experiment?

the difference between a constant in a graph and a constant in a experiment is that when on a graph, the constant is the thing that changes, and in a experiment it is the part that stays the same.


Difference between genric pointer and normal pointer?

Generic pointer of type 'void *' is compatible with any (data-)pointer, but you cannot use the following operators on it: + - ++ -- += -= * -> []


What is a const pointer?

There are four ways to declare a pointer: <type> * <name>; - a variable pointer to a variable type. const <type> * <name>; - a variable pointer to a constant type. <type> * const <name> {address}; - a constant pointer to a variable type. const <type> * const <name> {address}; - a constant pointer to a constant type. The last two declarations are constant pointers. Being constants, you must assign an address to them at the point of instantiation. Note that the 2nd declaration is a pointer to a constant, not a constant pointer. That is, the object being referred to is treated as if it were constant but the pointer itself is variable so we can still change the address, but not the value at that address.


People also asked