M
Mara Guida
The Standard says that main()
Does qualifying either of the arguments (or return type) of main()
render the program non-conformant?
1) int main(int argc, const char *argv[]) { /* ... */ }
2) int main(int argc, char ** const argv) { /* ... */ }
3) int main(int argc, char restrict *argv[]) { /* ... */ }
4) int main(volatile int argc, char *argv[]) { /* ... */ }
Or, to put it another way,
are "char **" are "const char **" equivalent when used as function
parameters?
shall be defined with two parameters
int main(int argc, char *argv[]) { /* ... */ }
or equivalent
Does qualifying either of the arguments (or return type) of main()
render the program non-conformant?
1) int main(int argc, const char *argv[]) { /* ... */ }
2) int main(int argc, char ** const argv) { /* ... */ }
3) int main(int argc, char restrict *argv[]) { /* ... */ }
4) int main(volatile int argc, char *argv[]) { /* ... */ }
Or, to put it another way,
are "char **" are "const char **" equivalent when used as function
parameters?