write a C program to modify the constant variable
Attachments:
Answers
Answered by
2
#include<stdio.h>
void main()
{
const int i=10;
int *ptr = &i;
*ptr = (int *)20;
printf("%d",i);
return 0;
}
Output: 20.
Hope this helps!
void main()
{
const int i=10;
int *ptr = &i;
*ptr = (int *)20;
printf("%d",i);
return 0;
}
Output: 20.
Hope this helps!
Similar questions
Math,
8 months ago
Art,
1 year ago
Chemistry,
1 year ago
Social Sciences,
1 year ago
Science,
1 year ago