开发者

Variable readonly

How to make a variable readonly in C?

const int a = 10; //Is it readonly variable开发者_开发技巧?

If not, How readonly variable looks like in C? Please give an example.


It is readonly. But if you will use pointers' magic not accurately you can at random edit it


Yes it is, const allow a single initialisation at the definition.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜