What is the difference between constant pointer and pointer
to a constant. Give examples.
Answer Posted / prashant
the example given by Santosh for "Constant Pointer" is wrong .
Use
int * const p = &localVariable;
instead of const int *p = &localVariable;.
then we cant do p++ or p--;
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the best organizational structure?
What is n in c?
Explain that why C is procedural?
What is the difference between pure virtual function and virtual function?
Explain the use of 'auto' keyword
Explain the advantages and disadvantages of macros.
What is union and structure in c?
What is double pointer?
I have seen function declarations that look like this
What is an example of structure?
Write a program to reverse a linked list in c.
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
How does #define work?
What is meant by int main ()?
Explain the priority queues?