+ 1
Logical problem in programming
sen[i++] = ' '; May i ask the logic concept of c programming? if current i = 3; then the above coding should be sen[3] = ' '; or sen[4] = ' ' ?
2 Respostas
+ 12
Let's look at this example.
int x[] = {1,2,3,4,5};
int i = 0;
int j = 0;
cout << x[i++] << endl; // x[0] and then i = 1
cout << x[++j] << endl; // j = 1 and then x[1]
+ 2
Thank you for your explaination. It's clear to me now.