+ 4

What does m++ do here?

I am stuck here at the line 9. See the program https://code.sololearn.com/cF42KvljDibr/?ref=app

19th Feb 2018, 5:25 AM
Mr. Potter
Mr. Potter - avatar
3 Respostas
+ 12
This is 1 of my fav. C++ quiz... here m++ increments the index value of array m by 1 each time... so m[i] = m[i] * 2 is applied to the index values 0,2,4 and rest r left as it is i.e. index values 1 & 3.. so output is 21212 i hope this helps... ✌️👍😎 m++ is very imp. factor here... just change it to m+=2 o/p will. become 21121
19th Feb 2018, 9:03 AM
🌛DT🌜
🌛DT🌜 - avatar
+ 1
m++ = m+1
19th Feb 2018, 5:50 AM
HpLow
HpLow - avatar
0
My argument is see the program here m is taken as an array a[5] = {1,1,1,1,1} so a = m right so how can I increase the value of an array?
19th Feb 2018, 6:19 AM
Mr. Potter
Mr. Potter - avatar