Question 5- When we declare constant pointer to integer, we
CANNOT change:
1. Value pointed by pointer
2. Either addressing pointer variable or value at that
address
3. Changes are not permitted
4. Address in pointer variable
Answers
Answered by
4
Answer:
3. Changes are not permitted
Explanation:
Bcoz pointer is given as constant pointer to the integer when are giving a constant it cannot be modified so changes are not modified or permitted.
Answered by
0
Answer:
When we declare constant pointer to integer, we
CANNOT change the Address in pointer variable
Explanation:
int *const is a constant pointer to integer .
- Constant pointer to integer means that the variable being declared is a constant pointer pointing to an integer.
- This implies that the pointer shouldn’t point to some other address.
- Const qualifier doesn’t affect the value of integer in statement. So the value being stored in the address which is containing by the pointer, is allowed to change.
- int a=10,b=20;
int *const t = &a; \\ where 'a' is a integer variable.
*t = 20 \\ will work
t = &b \\ will not work
Similar questions
Social Sciences,
3 months ago
Science,
3 months ago
Science,
6 months ago
Math,
6 months ago
Computer Science,
11 months ago