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 use of static variable in c?
how to make a scientific calculater ?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Sir i need notes for structure,functions,pointers in c language can you help me please
What is clrscr ()?
Explain what are global variables and explain how do you declare them?
Where are the auto variables stored?
What does %c do in c?
What is the stack in c?
What is a good data structure to use for storing lines of text?
Explain what are run-time errors?
What is methods in c?
What is the acronym for ansi?
Is it cc or c in a letter?
What are the advantage of c language?