I just wrote a small program that reads command line arguments in C, nothing too difficult. I was also modifying them, for example changing the first character of the parameter to uppercase.
I know that you shouldn't modify string literals as it can cause undefined behavior, so was just wondering if the strings in the *argv[]
are literals that you shouldn't change.
int main(int argc, char *argv[])
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…