Is it the same as arr[i++] or arr[i]++
It’s not the same as either.
Try
int x[1];
x[0]=5;
cout<<++x[0]<<" ";
cout<<x[0]<<endl;
Then try
int x[1];
x[0]=5;
cout<<x[0]++<<" ";
cout<<x[0]<<endl;
1 Like
Also try:
int a[] = {1,2,3,4,5,6,7,8,9,10};
int i = 0;
while (i < 10) cout << arr[i++] << endl;
1 Like
Got it guys thanks
jeez i am so lazy