R
rahulsinner
Hi,
Consider the following.
#include <stdio.h>
int main()
{
const int i=10;
int *ptr=&i;
*ptr=20;
return 0;
}
This code compiles with a "suspicious pointer conversion" warning and
thus, is able to voilate the integrity of constants.
What does the standard say about it?
Rahul
Consider the following.
#include <stdio.h>
int main()
{
const int i=10;
int *ptr=&i;
*ptr=20;
return 0;
}
This code compiles with a "suspicious pointer conversion" warning and
thus, is able to voilate the integrity of constants.
What does the standard say about it?
Rahul