RE: What would be the output of the following program? main() { const int x=5; int *ptrx; ptrx=&x; *ptrx=10; printf("%d",x); }
it is not a matter of compiler it is matter of our fundamental so fundamental is that we can not change constant . so there is error. if talk to turbo compiler then run this program without error. and i m telling that turbo compiler has sevrak mistakes that confuse a begginer.
RE: What would be the output of the following program? main() { const int x=5; int *ptrx; ptrx=&x; *ptrx=10; printf("%d",x); }
it is not a matter of compiler it is matter of our fundamental so fundamental is that we can not change constant . so there is error. if talk to turbo compiler then run this program without error. and i m telling that turbo compiler has sevral mistakes that confuse a begginers.