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
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
What does it mean when the linker says that _end is undefined?
a c code by using memory allocation for add ,multiply of sprase matrixes
Explain can you assign a different address to an array tag?
What is variable and explain rules to declare variable in c?
What are # preprocessor operator in c?
What is a volatile keyword in c?
What does the && operator do in a program code?
What are header files why are they important?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What is context in c?
Does sprintf put null character?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is an lvalue?
How can I do serial ("comm") port I/O?