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 your stream meaning?
Write a code to generate a series where the next element is the sum of last k terms.
What is null in c?
Why isnt any of this standardized in c?
Describe wild pointers in c?
What are qualifiers?
how logic is used
How will you write a code for accessing the length of an array without assigning it to another variable?
What is wrong with this code?
What are valid operations on pointers?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Write a program to check palindrome number in c programming?
What is the difference between a free-standing and a hosted environment?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
What is stack in c?