vendredi 29 janvier 2021

Does the order of `const` and e.g. `int` make a difference in C? [duplicate]

I've looked around C and C++ FAQs and tutorials and haven't been able to find a clearcut answer.

What difference, if any, does it make to write:

const int i;
int const j;

While we are at it, is there any difference between

const int a[10];
int const b[10];

(Yes, I know about e.g. const int *p and int *const q, the first is a mutable pointer to a constant object, the second is a constant pointer to a mutable object).

Aucun commentaire:

Enregistrer un commentaire