What is a const pointer, and how does it differ from a pointer to a const?
Answer Posted / glibwaresoftsolutions
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
Explain what does the function toupper() do?
What are types of preprocessor in c?
Explain can static variables be declared in a header file?
What is a struct c#?
What does emoji p mean?
What is signed and unsigned?
What is calloc()?
What is bin sh c?
Apart from dennis ritchie who the other person who contributed in design of c language.
Do array subscripts always start with zero?
Can you please explain the difference between exit() and _exit() function?
What does %c mean in c?
Tell us bitwise shift operators?
What is an auto variable in c?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory