What is a const pointer, and how does it differ from a pointer to a const?
Answer Posted / nashiinformaticssolutions
1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the size of array float a(10)?
What does a pointer variable always consist of?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
Which node is more powerful and can handle local information processing or graphics processing?
write a program to copy the string using switch case?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
What is the difference between printf and scanf in c?
What are the 5 data types?
Write a program to reverse a given number in c?
What are the types of unary operators?
What are the 5 types of organizational structures?
which type of aspect you want from the student.
Why doesnt the call scanf work?
What is advantage of pointer in c?
Explain what is the difference between null and nul?